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.
How to rename a file with date/time
Name: AlvaChris Date: May 21, 2004 at 20:13:26 Pacific OS: Windows XP CPU/Ram: Intel 2GB
Comment:
Hi, I don't have much experience with DOS, and I need some help on how to rename a file indicating the system's date and time as the file's name. i.e.:
TextFile.dat would need to be rename to 05/21/04_20:07.dat
Name: XpUser Date: May 21, 2004 at 21:11:08 Pacific
Reply:
Hi AlvaChris,
I believe you will need to write a batch file in order to achieve this. I'm not certain if a batch file such as this one(http://www.winnetmag.com/Articles/Print.cfm?ArticleID=13575) would work under XP. (It was created to work under the OS preceding XP.)
0
Response Number 2
Name: AlvaChris Date: May 22, 2004 at 00:35:27 Pacific
Reply:
I'm almost there but not quite.
When using DOS on WindowsXP the date is represented as follows: i.e. Sat 05222004
My batch program is suposed to rename a file with the current date. However I get a syntax error on the command line because of the space between "Sat" and "05". I have tried different ways to omit the day of the week but it seems that the system treats Sat 05 as one string element. Any ideas?
Thanks,
Chris
0
Response Number 3
Name: Nigel Spike Date: May 22, 2004 at 15:02:00 Pacific
Reply:
Does it have to be via "DOS" (I guess you mean Command Prompt). Otherwise D/L Total Commander. It lets you change all attributes of a file, including date and time.
Summary: Hello, Im trying to rename a file using a batch file appending to it the current date e.g. test.txt -> test07/02/2005.txt. My initial thought was to do the following - set timestamp=%DATE% ren c:\test...
Summary: Hi, I want to know how to open a port with Windows XP. Ive looked everywheres. Its driving me insane! Can it only be done through the internet connection firewall in Network Connections? Because that ...
Summary: Hi, I wish to rename a log file by appending the date to the end of the file name. This is what it is named now: log.txt This is what I want to rename it to using today's date of 09/18/2005: log09182...