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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy all files in a directory move to new directory

Status
Not open for further replies.

Inspin

Technical User
Joined
Dec 17, 2002
Messages
6
Location
US
subject explains it all

copy all files from directory a and paste them to directory b

 
Hi

Copies a file.

Syntax

FileCopy source, destination

The FileCopy statement syntax has these named arguments:

Part Description
source Required. String expression that specifies the name of the file to be copied. The source may include directory or folder, and drive.
destination Required. String expression that specifies the target file name. The destination may include directory or folder, and drive.
Remarks

If you try to use the FileCopy statement on a currently open file, an error occurs.

Would seem to do it, I have not tried it with wild cards, worth a try

FileCopy "C:\Folder1\*.*" "c:\Folder2\*.*"

Otherwise you could look up the FileSystem object,

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
... but .... but ... but ...


UNLESS these are STRICTLY "User" / DATA files you are creating a morass of T-R-O-U-B-L-E.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top