Add Date to File Using Cmd
Hello,
I have a batch file that is executing cmd statements. I am using this code to append the current date to a file before moving it to another location. I now have a need to use yesterday's date instead but don't know how to modify this script to do this. Here is my current date script:
for /F "tokens=1-4 delims=/ " %%i in ('date /t') do (
set DayOfWeek=%%i
set Month=%%j
set Day=%%k
set Year=%%l
set Date=%%i %%j/%%k/%%l
)
Thanks!
|