OSDN Git Service

Better way to obtain the ISO date, without using a Temp file.
[lamexp/LameXP.git] / etc / Deployment / _date.bat
1 @echo off
2 set "ISO_DATE="
3 set "LAMEXP_ERROR=1"
4 REM ------------------------------------------
5 if not exist "%~dp0\..\Utilities\Date.exe" GOTO:EOF
6 for /F "tokens=1,2 delims=:" %%a in ('"%~dp0\..\Utilities\Date.exe" +ISODATE:%%Y-%%m-%%d') do (
7         if "%%a"=="ISODATE" set "ISO_DATE=%%b"
8 )
9 if "%ISO_DATE%"=="" GOTO:EOF
10 REM ------------------------------------------
11 echo %ISO_DATE%
12 set "LAMEXP_ERROR=0"