Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ECHO OFF
- : Sets the proper date and time stamp with 24Hr Time for log file naming
- : convention ('YYYYMMDD_HHMMSS')
- : Scrapes the characters out of their expected permissions in the date/time
- : environment variables.
- : Expects a date format of '____MM_DD_YYYY'
- : Expects a time format of 'HH:MM:SS' or ' H:MM:SS'
- SET HOUR=%time:~0,2%
- SET dtStamp9=%date:~-4%%date:~4,2%%date:~7,2%
- SET dtStamp24=%date:~-4%%date:~4,2%%date:~7,2%
- if "%HOUR:~0,1%" == " " (SET dtStamp=%dtStamp9%) else (SET dtStamp=%dtStamp24%)
- echo %dtStamp%| clip
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement