VB Code:
  1. Option Explicit
  2. 'Add a command button
  3. Private Type SHFILEOPSTRUCT
  4.     hWnd As Long
  5.     wFunc As Long
  6.     pFrom As String
  7.     pTo As String
  8.     fFlags As Integer
  9.     fAborted As Boolean
  10.     hNameMaps As Long
  11.     sProgress As String
  12. End Type
  13.  
  14. Private Const FO_MOVE As Long = &H1
  15. Private Const FO_COPY As Long = &H2
  16. Private Const FO_DELETE = &H3
  17. Private Const FO_RENAME As Long = &H4
  18.  
  19. Private Const FOF_ALLOWUNDO = &H40
  20. Private Const FOF_SIMPLEPROGRESS As Long = &H100
  21. Private Const FOF_NOCONFIRMATION As Long = &H10
  22. Private Const FOF_NOCONFIRMMKDIR As Long = &H200
  23. Private Const FOF_NOERRORUI As Long = &H400
  24. Private Const FOF_RENAMEONCOLLISION As Long = &H8
  25. Private Const FOF_SILENT As Long = &H4
  26. Private Const FOF_WANTNUKEWARNING As Long = &H4000
  27.  
  28. Private Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" (lpFileOp As SHFILEOPSTRUCT) As Long
  29.  
  30. Private Sub Form_Load()
  31. Dim SHFileOp As SHFILEOPSTRUCT
  32.     With SHFileOp
  33.         .wFunc = FO_COPY
  34.         .pFrom = "C:\pb" 'Select a folder and all its subdirectories/files
  35.         .pTo = "C:\Program Files\EA GAMES" 'You can also rename the file if you want of leave it the same
  36.         .fFlags = FOF_NOCONFIRMATION
  37.     End With
  38.     'perform file operation
  39.     SHFileOperation SHFileOp
  40. End Sub

I did that and it didn't overwrite the folder, it just put my contents from the C:\pb folder into the other one.