3041Re: [BATCH WORLD] Append File Name w/ Date
- May 7 9:07 AM@echo off
for /f "tokens=2-4 delims=/- " %%a in ("%date%") do set DAY=%%c%%b%%a
:: gives the output format 20020821
:: when the DATE /T output is "Wed 21/08/2002"
for /f "delims=" %%a in ('dir *.* /b') do ren "%%a" "%%~na.%day%%%~xa"
Not tested, so make sure you test it on a dummy folder first.
On Wed, 07 May 2003 10:40:37 -0500, Jolly Green Giant
>File date format: pretty much anything. YYYYMMDD would be fine.
>Time is not necessary, thanks.
>thanks for the response!
>__________/ Michael Marquart \__________
>>What OS? What is the file date format? Do you also want time?
>>On Tue, 06 May 2003 14:23:54 -0500, Jolly Green Giant
>> >anyone got a batch file that will append the filemodification date to
>> >filename for every file in a folder?
- << Previous post in topic Next post in topic >>