Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

moving multiple files

Status
Not open for further replies.

dbsquared

Programmer
Nov 7, 2002
175
US
I am trying to use the .movefile to move multiple files from one directory to another and I am getting the error file not found. I have checked and all the files are there.

Code:
Set fso2 = New Scripting.FileSystemObject
tempdate = Format(Date, "yyyymmdd")
fso2.MoveFile "C:\temptest\" & tempdate & " *.*", "C:\temptest\Archive\"

according to the help .movefile should be able to move mutiple files, and I can't figure out what it is doing.

Any help would be appreciated.
Thanks

To go where no programmer has gone before.
 
Before *.*, delete the space and add a \

fso2.MoveFile "C:\temptest\" & tempdate & "\*.*", "C:\temptest\Archive\"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top