Loading ...
Sorry, an error occurred while loading the content.

3041Re: [BATCH WORLD] Append File Name w/ Date

Expand Messages
  • Michael Marquart
    May 7 9:07 AM
    • 0 Attachment
      @echo off
      for /f "tokens=2-4 delims=/- " %%a in ("%date%") do set DAY=%%c%%b%%a
      echo %day%
      :: 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"
      set day=


      Not tested, so make sure you test it on a dummy folder first.

      --
      Regards,
      Michael



      On Wed, 07 May 2003 10:40:37 -0500, Jolly Green Giant
      <jollygreengiant@...> wrote:

      >Windows 2000
      >
      >File date format: pretty much anything. YYYYMMDD would be fine.
      >
      >Time is not necessary, thanks.
      >
      >thanks for the response!
      >David
      >
      >__________/ 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
      >><jollygreengiant@...> wrote:
      >>
      >> >anyone got a batch file that will append the filemodification date to
      >> the
      >> >filename for every file in a folder?
    • Show all 12 messages in this topic