backupworker
MIS
Hi - trying to write a script using xcopy. one of the things i want to do is copy a file to another directory and have it rename the file. so, for example, i got file123.exe in c:\temp. i want to copy the file to c:\temp2 and rename it to setup.exe.
problem is the numbers in the file name changes every day, so it might be file123, file987, file 456, etc.
here's the xcopy command i want to run:
xcopy c:\temp\file*.exe c:\temp2\setup.exe
xcopy always comes up with the following prompt when it runs the file:
Does C:\test2\setup.exe specify a file name
or directory name on the target
(F = file, D = directory)?
it will not copy and rename the file until i hit "F". this script runs at 1AM so i want it to automtically know that this is a file w/o having to hit F.
Anyone know how i can bypass this? Thanks!
problem is the numbers in the file name changes every day, so it might be file123, file987, file 456, etc.
here's the xcopy command i want to run:
xcopy c:\temp\file*.exe c:\temp2\setup.exe
xcopy always comes up with the following prompt when it runs the file:
Does C:\test2\setup.exe specify a file name
or directory name on the target
(F = file, D = directory)?
it will not copy and rename the file until i hit "F". this script runs at 1AM so i want it to automtically know that this is a file w/o having to hit F.
Anyone know how i can bypass this? Thanks!