Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Save file name with date at end of file name....  (Read 2918 times)

0 Members and 1 Guest are viewing this topic.

dkennelly

    Topic Starter


    Rookie

    Save file name with date at end of file name....
    « on: June 02, 2010, 07:58:20 AM »
    I would like to copy an existing file (bridium.txt) and save it to another location but with the current date in the file name (bridium06012010.txt).  How do I accomplish this with a bat file?

    dkennelly

      Topic Starter


      Rookie

      Re: Save file name with date at end of file name....
      « Reply #1 on: June 02, 2010, 08:47:04 AM »
      I got it figured out.....

      for /f "tokens=1-5 delims=/ " %%d in ("%date%") do rename "bridium.txt" bridium%%e-%%f-%%g.txt

      Salmon Trout

      • Guest
      Re: Save file name with date at end of file name....
      « Reply #2 on: June 02, 2010, 03:35:27 PM »
      That will only work for people with US style date formatting.