thecentz303
IS-IT--Management
Good Day everyone,
I am trying to create a batch file that will take a .txt document and rename it, appending the yesterdays date to it. I found after much searching I could use the batch file below to append the current date buy I have not found a way to increment down 1 day.
Any help would be greatly appreciated.
echo on
if not exist E:\accounting\Checks Issued\Checks_Issued_Daily.txt goto END
copy "E:\accounting\Checks Issued\Checks_Issued_Daily.txt" "E:\accounting\Checks Issued\Archive\Checks_Issued_Daily-%date:~4,2%-%date:~7,2%-%date:~12,2%.txt"
:END
I am trying to create a batch file that will take a .txt document and rename it, appending the yesterdays date to it. I found after much searching I could use the batch file below to append the current date buy I have not found a way to increment down 1 day.
Any help would be greatly appreciated.
echo on
if not exist E:\accounting\Checks Issued\Checks_Issued_Daily.txt goto END
copy "E:\accounting\Checks Issued\Checks_Issued_Daily.txt" "E:\accounting\Checks Issued\Archive\Checks_Issued_Daily-%date:~4,2%-%date:~7,2%-%date:~12,2%.txt"
:END