CodeItBetter Programming Another VB Programming Blog

How to copy all folders and files from one location to another location

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
'File/Folder Handling - How to copy all folders and files from one location to another location
Option Explicit
 
Sub Main()
'This will copy all folders in D:\Test\ to C:\Temp
    Dim oFSO As New Scripting.FileSystemObject
    Set oFSO = New FileSystemObject
    oFSO.CopyFolder "D:\Test\*", "C:\Temp\", False
    Set oFSO = Nothing
End Sub

Related posts:

  1. How to Copy the files to another directory (in three ways)
  2. How to Copy Folder from one directory to another directory (in Two ways)
  3. How to count number of files in a given directory (in two ways)
  4. How to List all the DLL files in the C:\WINDOWS\SYSTEM directory.
  5. How to scan folders for Files (in two ways)
  6. How to Rename files (in five ways)
  7. How to get the file name without its extension and path
  8. How to Rename folder (in three ways)
  9. Create Nested Directories (in two ways)
  10. How to Check whether two files are identical

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.