I've had some success doing things differently.
I have set a variable with my 2 file locations and file names and run the variable further on in the script as follows:
execute cmd.exe /C xcopy $(vDataBackup) /Y;
This works fine apart from the command prompt ops up and forces me to declare a file or directory (F or D). when U type F it the executed fine and my file is renamed and copied. However I want to schedule this overnight and don't wish to have to intervene..........thoughts.
Aunt Google found something:
A seemingly undocumented trick is to put a
*at the end of the destination - then
xcopywill copy as a file, like so
xcopy c:\source\file.txt c:\destination\newfile.txt*
Actually xcopy does not ask you if the original file exists, but if you want to put it in a new folder named Shapes.atc, or in the folder Support (which is what you want.
To prevent xcopy from asking this, just tell him the destination folder, so there's no ambiguity:
xcopy /s/y "J:\Old path\Shapes.atc" "C:\Documents and Settings\his name\Support"
If you want to change the filename in destination just use copy (which is more adapted than xcopy when copying files):
copy /y "J:\Old path\Shapes.atc" "C:\Documents and Settings\his name\Support\Shapes-new.atc