|I've knocked this batch/vb script together to show one method of calculating/manipulating dates. It is designed to change the name of the current payroll file only, if you want to rename older files that's another subject. The script has been run only in Windows XP, leave the testing on Win 7 to you. Note that the date format shown is to suit my system date format (day dd/mm/yyyy) you may need to adjust the script to suit your system date format.|
set eval=1&call :calc
set eval=15&call :calc
:: renaming commands go here <<------------------------------e.g.
:: ren "path\filename.ext" "%days-ago%-%yesterday%-filename.ext"
> %vbs% echo WScript.Echo DateAdd("d",-%eval%,Date)
for /f "tokens=* delims=" %%a in ('cscript //nologo %vbs%') do (
Please come back & tell us if your problem is resolved.