September 25, 200421 yr Hey i am trying to get a command in VB that allows me to copy a actual folder from one place to another, but VB 6 only supports FileCopy which copys a file from one location toanother, i have thought about it useing Shell XCOPY, but the problem is if i do that then i am gonig to need it to report back that it has done so the code can continue to run, Also i dont want to use and Refrences, i would rather use API but i dont know a API call for that only for CopyFile, but i have even tryed FileCopy C:\blah\*.* C:\blah2\*.* but it only copied the files that was in the root of blah folder. Thanks In AdvanceDessip
October 7, 200421 yr Try this, Dim fs As Object Set fs = CreateObject("Scripting.FileSystemObject") fs.CopyFolder "C:\Temp", "D:\Temp" Set fs = NothingThis copies all subfolders and files from the first path to the second path, note that both folders must exist.
Create an account or sign in to comment