Private Sub subFile_Xcopy(ByVal sSource As String, ByVal
sDestination As String, ByVal bOverwrite As Boolean) Dim fs As New Scripting.FileSystemObject 'Copies an entire folder to another location 'es. subFile_Xcopy "C:\Windows\Media","C:\Media",False On Error Resume Next fs.CopyFolder sSource, sDestination, bOverwrite End Sub Private Sub xx_Copy() Dim fs As New Scripting.FileSystemObject, f As Scripting.file, p As Scripting.Folder For Each f In fs.GetFolder(temp).Files fs.CopyFile f.Path, sDestination, bOverwrite Next For Each p In fs.GetFolder(temp).SubFolders 'Recurse Next end sub |