Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @rem Original source: www.computerhope.com/issues/ch000987.htm
- @rem Purpose: echo in Command Prompt the date and time in the following format:
- @rem YYYYmmDD_hhMMss
- @echo off
- for /f "tokens=1-4 delims=/ " %%d in ("%date%") do set dateNow=%%e%%f%%g
- for /f "tokens=1-3 delims=:." %%d in ("%time%") do set timeNow=%%d%%e%%f
- echo %dateNow%_%timeNow%
- pause
Advertisement
Add Comment
Please, Sign In to add comment