How can I copy a folder, with everything in it, to other locatrion, using VB code?
Thanks in advance
Leo
Printable View
How can I copy a folder, with everything in it, to other locatrion, using VB code?
Thanks in advance
Leo
The simplest method is to set a reference to the Microsoft Scripting Runtime and use the FileSystemObject... ie:
private Sub Command1_Click()
Dim fs as FileSystemObject
set fs = new FileSystemObject
fs.CopyFolder "c:\myfolder", "c:\newfolder", false
End Sub
You could also use the SHFileOperation API call if you want to see the Windows copy animation window.