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?