4

The 'dir' command has a /T switch which selects whether to display the creation, access or modification time. However, it doesn't seem to be able to list files along with all three dates for each file -- how can I do this?

3 Answers 3

2

It is not possible in MS-DOS. You can only use one time field (C or A or W) for T at a time.

1
  • They’re not asking about DOS, they only added that tag erroneously instead of the command-prompt tag (which is redundant anyway since they already used the dir tag). Besides, the title clearly says on windows.
    – Synetech
    Sep 1, 2012 at 23:14
2

if you can use Powershell, ls | fl (powershell ls^|fl from cmd) will show those (among others). You can include only props you need:
ls | fl -prop name, creationTime,lastAccessTime,LastWriteTime.
Use ls | get-member to see available properties

1
  • get-childitem d:\temp -rec | where {!$_.PSIsContainer} | >> select-object FullName, LastWriteTime, creationTime, lastAccessTime, Length | export-csv -notypeinformation -delimiter '|' -path file.csv will do same recursively
    – bendecko
    Feb 11, 2021 at 15:51
0

You can’t do that with the Windows command-prompt itself; it only supports a single timestamp column, but you could try third-party alternatives like 4DOS or Console (formerly known as Console 2). In fact, open-source ones like Console are best because you can request the feature (technically Console doesn’t replace the command-interpreter itself, but I’m sure they can extend some commands like this).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .