I have a batch file that outputs the NTFS date/timestamps on files, and I noticed that while the year, month, day, minutes and seconds fields all have a leading zero for values less than 10, the hours field does not.
When I run the batch file on a filespec, this messes up the columnar alignment:
12/07/07,13:20:59.794 12/07/07,13:20:59.795 12/07/07,13:21:03.054 speed test.doc
12/07/10,14:22:59.506 12/07/10,14:22:59.506 10/11/01,6:21:00.000 Stephen_King-Survivor_Type.doc
Notice the time in the third column for the Stephen King file. It would be nice if the "6" were output as "06" like the other fields. I know I could write a function that would pull the string apart and put it back together again, but it just seems the leading zero should be in with the other fields.
Thank you!
Gary
When I run the batch file on a filespec, this messes up the columnar alignment:
12/07/07,13:20:59.794 12/07/07,13:20:59.795 12/07/07,13:21:03.054 speed test.doc
12/07/10,14:22:59.506 12/07/10,14:22:59.506 10/11/01,6:21:00.000 Stephen_King-Survivor_Type.doc
Notice the time in the third column for the Stephen King file. It would be nice if the "6" were output as "06" like the other fields. I know I could write a function that would pull the string apart and put it back together again, but it just seems the leading zero should be in with the other fields.
Thank you!
Gary