Help with batch files
I need to download files with varying cust numbers and dates. Currently I have to change these on each line of code. I'm trying to use the "set" command so I'll only have to do this once at the beginning of the file but it doesn't work corretly.This is what I have:
echo offcolor 17set plant =0091set date =20081103
set localroot=\\co-atl-rw-01\rsrem set localroot=d:
copy %localroot%\rs_input\D1_%plant%_*%date%.txt %localroot%\rs_input\D1_%plant%_Monday_%date%.txtAny suggestions?
November 4th, 2008 3:51pm
Date is an environment/system variable. Try changing your date variable to something else, say, datenow and use %datenow% in the line doing the copying.Regards,Salvador Manaois III MCSE MCSA CEH MCITP | Enterprise/Server Admin Bytes & Badz : http://badzmanaois.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
November 4th, 2008 8:03pm
Hi,
As this issue is related to scripting, I suggest discussing it in our MSDN forum. They mainly deal with scripting issues.
http://forums.microsoft.com/MSDN/default.aspx?siteid=1
I hope your issue can be resolved soon.
Tim Quan - MSFT
November 5th, 2008 10:38am