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.