Assuming you're on a relatively recent version of Windows and Command Extensions are turned on (which they usually are), the %TIME% variable will return this. Running "HELP SET" or "SET /?" from the command line (without the quotes, of course) will tell you more about the other variables and expressions supported by the batch language. That works for the other .bat/.cmd operations too. I believe there are instructables which describe more of the tricks of working with command files in Windows -- not to mention whole websites dedicated to useful little idioms. A bit of searching should find all of these.
Select as Best AnswerUndo Best Answer
There are two ways to view the time:1. @echo %time%pause>nul2.setlocal enabledelayedexpansion & time /Tpause>nulBoth are viable options.
Thats an easy one. Just type %time% or echo %time%. that should work. always works for me. and you can get the date. same syntax. %date% or echo %date%.