Dos Batch Routine needed that will only run on the 28th, 29th, 30th or 31st of the month.
Posted on 2011-09-22
I use the following command to rename a log file that I use for a client's backup system. I want the command to proceed only if the current date is equal to or greater than 28
This client creates a backup every thursday and on the last day of the month and the last day of the month always changes. it's either the 28th, 29th, 30th or 31st.
The log file becomes too big and so I want the following command to run which will rename the log file.
ren "C:\Backup_Logs.txt" Backup_Logs-%date:~4,2%%date:~7,2%%date:~10,4%.txt
I need an IF statement in front of this that says if current date = 28 or greater then run, if not then end
Thanks for your help!