|
-
October 23rd, 2001, 02:32 PM
#1
Copying Folders from one place to another...
How can I copy a folder, with everything in it, to other locatrion, using VB code?
Thanks in advance
Leo
-
October 23rd, 2001, 02:47 PM
#2
Re: Copying Folders from one place to another...
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|