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.
Rename *.TXT file with 24 Hour Time Stamp
Name: DealMaker Date: August 4, 2009 at 02:26:28 Pacific OS: Windows 2003 Subcategory: Batch
Comment:
Hello,
I am trying to create a batch file which will rename *.TXT files with the current time. The command below works perfectly when the time is betwenn 10am and 12:59am but does work when the time is beween 01:00 and 09:59. Any idea's why? The command I am using is below:
ren *.txt txt_%time:~0,2%%time:~3,2%.txt
If I was to run the command now it would work and rename the text file as txt_10:25.txt.
Any suggestions on why it does not work between the hours of 01:00 - 09:59?
Summary: I have figured out how to rename a file with the date with the command below: ren test.txt test_%date:~4,2%-%date:~7,2%-%date:~10,4%.txt However I would also like to rename a file with the time. Doe...
Summary: Hi all, I apologies for my total lack of programming knowledge, but I have been having a look at some of the threads on this forum and am convinced someone can help me... I was wondering if it is poss...
Summary: I need a specific batch to rename txt files to a format, using the data from the txt file itself. data within the files is for example: 0199999920090018888888888888P20 The file name has to get this n...