PDA

View Full Version : Copy file with rename


MarkSchramm
12-03-2004, 06:52 PM
How would I copy a file from location 1 to location 2 and during the copy, rename the file to something else.

The copy action seems to only copy the exact same name.

kinook
12-04-2004, 09:37 AM
Use a Run Program action with a command of:

%DOSCMD% copy "c:\path\to\source\file.ext" "c:\dest\path\newname.ext"

or a Run Script action with code of:

vbld_FSO.CopyFile "c:\path\to\source\file.ext", "c:\dest\path\newname.ext"