Computing.Net > Forums > Disk Operating System > Renaming file to current date.

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Renaming file to current date.

Reply to Message Icon

Name: Darin Ambrose
Date: May 29, 2002 at 11:45:34 Pacific
Comment:

Does anybody have a batch file that file rename a file to a certain date. ex. hold.doc to 20020529.doc



Sponsored Link
Ads by Google

Response Number 1
Name: Renaissance Man
Date: May 29, 2002 at 15:01:51 Pacific
Reply:

Scroll down. There have been several posts in the last week or two about the exact same topic.


0

Response Number 2
Name: Secret_Doom
Date: May 29, 2002 at 21:30:43 Pacific
Reply:

R_Man is right, that's been one of the top FAQs from this forum.

FAQ #02 - Get current date into variable without separators
http://www.batch.hpg.com.br/index.htm#02

Let's say you save the current date to the %DATE% variable. Then, this is what you've got to do:

REN HOLD.DOC %DATE%.DOC

-- Secret_Doom - Leonardo Pignataro --

secret_doom@hotmail.com
www.batch.hpg.com.br


0

Response Number 3
Name: JJ
Date: May 30, 2002 at 01:09:08 Pacific
Reply:

A small program, DateEdit can change date/time, works in WinXP also.

http://home.worldonline.dk/~ninotech/


0

Response Number 4
Name: Secret_Doom
Date: May 30, 2002 at 11:41:59 Pacific
Reply:

In NT systems (such as XP), this is very easy to do, can be done in just one line:

set date2=%date:~4,2%%date:~7,2%%date:~10,4%

-- Secret_Doom - Leonardo Pignataro --

secret_doom@hotmail.com
www.batch.hpg.com.br


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Renaming file to current date.

Rename file to yesterdays date www.computing.net/answers/dos/rename-file-to-yesterdays-date/13933.html

Rename file with current date www.computing.net/answers/dos/rename-file-with-current-date/13069.html

Rename file to include date www.computing.net/answers/dos/rename-file-to-include-date/13768.html