I have a batch file that is not working when I run it. For some reason, I don't know where the error is in my script that would cause the file to not produce what I am wanting. I am trying to run a schedule task to add the date and time to a file and then copy that file to a different directory. It was working fine last week, but now I keep getting an error that says there is an error in myt batch file. Here is what I have.
cd ..\DataVault\exports
copy LetterData.txt HarlandClarkeArchive
copy HFSBill.txt HarlandClarkeArchive
cd Realm
ren LetterData.txt DailyLetterData_%Date:~-4,4%%Date:~-10,2%%Date:~-7,2%,4%_%time:~0,2%%time:~3,2%_%time:~6,5%.txt
ren HFSBill.txt HFSBillStmt_%Date:~-4,4%%Date:~-10,2%%Date:~-7,2%,4%_%time:~0,2%%time:~3,2%_%time:~6,5%.txt
Thanks in adavance for the help!
Jason
cd ..\DataVault\exports
copy LetterData.txt HarlandClarkeArchive
copy HFSBill.txt HarlandClarkeArchive
cd Realm
ren LetterData.txt DailyLetterData_%Date:~-4,4%%Date:~-10,2%%Date:~-7,2%,4%_%time:~0,2%%time:~3,2%_%time:~6,5%.txt
ren HFSBill.txt HFSBillStmt_%Date:~-4,4%%Date:~-10,2%%Date:~-7,2%,4%_%time:~0,2%%time:~3,2%_%time:~6,5%.txt
Thanks in adavance for the help!
Jason