3046Re: [BATCH WORLD] Append File Name w/ Date
- May 7, 2003If you have a look toward the bottom of the
help output you will see all the variables that you can use, similar to
the %~tX variable that provides the file date/time, and which is the
variable that is parsed in this batch file.
A dir /b is used to get the list of filenames to be processed.
Thanks for the feedback.
On Wed, 07 May 2003 13:36:43 -0500, Jolly Green Giant
>Works great!!! Thanks!
>So, for my own education, what I'm seeing is that we are not able to get
>into any file attributes that are not displayable on the screen, eh? We
>basically read in a directory listing, and then parse that, right?
>__________/ Michael Marquart \__________
>>I did note one error - the terms in the target portion of the rename
>>command should be correct now.
>>:: Renames all files in the current folder to filename-yymmdd.ext
>>:: when DIR date format is in mmddyy
>>for /f "delims=" %%a in ('dir *.* /b') do (
>>for /f "tokens=1-3 delims=/- " %%b in ("%%~ta") do (
>>echo ren "%%a" "%%~na-%%d%%b%%c%%~xa"
- << Previous post in topic