Created
February 18, 2015 07:34
-
-
Save jcefoli/be7cff310e8164eedf5e to your computer and use it in GitHub Desktop.
Set Date/Timestamp in Batch File Via Powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
for /f "usebackq" %%x in (`powershell "get-date -f yyyy-MM-dd_HH:mm:ss"`) do set datetimestamp=%%x | |
echo %datetimestamp% | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment