Leo Koach
October 23rd, 2001, 02:32 PM
How can I copy a folder, with everything in it, to other locatrion, using VB code?
Thanks in advance
Leo
Thanks in advance
Leo
|
Click to See Complete Forum and Search --> : Copying Folders from one place to another... Leo Koach October 23rd, 2001, 02:32 PM How can I copy a folder, with everything in it, to other locatrion, using VB code? Thanks in advance Leo DSJ October 23rd, 2001, 02:47 PM 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. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |