|you can't use colons next to parentheses, it makes errors.|
I'll just repost the whole shebang:
@echo off & setlocal
copy %0.bat nul >nul
for /f "skip=4" %%a in ('dir %0.bat /t:a') do set dt=%%a & goto :aa
for /f "tokens=*" %%a in ('dir /b /ad *.*') do (
echo ren "%%a" "%%a%dt%"
:: ---- end of script
the echo does not need to be comm'd out, since it doesn't do any "destructive" operation - just displays.
when you want to activate the script, take echo off the line so it looks like:
ren "%%a" "%%a%dt%"
and be sure to leave the :aa in there! it is a label.