Does anyone have a code snipit to share that shows how to copy c:\start\*.* to c:\end ? The wild card copy seems to be a problem. Thanks.
Printable View
Does anyone have a code snipit to share that shows how to copy c:\start\*.* to c:\end ? The wild card copy seems to be a problem. Thanks.
Untested, but I had a previous problem where I had to use a single wildcard :
c:\start\* to c:\end
and this worked insted, I will take another look though...
some of the functions in the FileSystemObject allow wildcards. Look it up on the MSDN CD or website.
reeset shows an example of how to do this in this thread.
Code:'copy the contents of a folder or directroy
'to a folder on a different drive
'using a wild card
Private Sub Form_Load()
Dim FSO As Object
On Error GoTo NOFSO
Set FSO = CreateObject("Scripting.FileSystemObject")
On Error Resume Next
FSO.CopyFile "C:\MySubDir\MyOtherSubDir\*", "C:\MyNewDir\", True
Set FSO = Nothing
Exit Sub
NOFSO:
MsgBox "FSO CreateObject Failed"
End Sub
Thanks, works great!!!!!