directorydossecondsfiletime

List timedate of files including seconds (in the format "hh:mm:ss" instead of "hh:mm")


I need to save the file index of an MS-DOS folder, keeping the full date/time of any file, including seconds (hh:mm:ss).

With the simple dir command, I can easily do that without seconds (hh:mm). For example, in this way:

dir > mylist.txt

...I can get this:

06/02/2001  16:27           466.114 file1.zip
29/12/2003  17:47            14.331 file2.zip

...but, unfortunately, I really need seconds.

For me it's not a trouble to rewrite any result in a presentable way, eliminating unwanted attributes (such as filesize, random spaces etc...) or swapping columns, using RegExp, I already have UltraEdit for that.

Any ideas on how I could add seconds to the list?

I can install third-part software if needed...

Thanks in advance!


Solution

  • I did not quite comprehend your problem. Looks like you have some storage device used with MS-DOS. And now you try to get from that file timestamps in hh:mm:ss format?

    Good thing first: MS-DOS stores time with a 2secs resolution. So you "just" lack of a tool reading it out and displaying it. E.g. DIR will only show hh:mm.

    I understand that you somewhat favour Total Commander? I have it on my machine but actually don't use it. But is seems you can add USER DEFINED columns and choose their format including hh:mm:ss. See screenshot below (sorry it's in German).

    PS: another option (from 1000 possible) is to write your own "DIR" e.g. with Perl which might be a 10-line script...

    enter image description here