In Windows 11, I often have several command prompts open and I sometimes forget which command prompt was the last one I ran a command in (e.g. when I take a break or come back the next day).
It would really help if I could toggle a command to print the
- the system time that the command was ran at
- the system time that the command completed execution
after the command completes.
I know how to do this manually for a command foo
:
set startDate=%date% & set startTime=%time% & foo & echo start = %startDate% %startTime% & echo compl = %date% %time%
but that’s too verbose. Ideally, there’d be a way to toggle this time printing behavior on and off — either on and off for a specific command or for the all commands.