rem TimeStamp a file
rem this batch file will create date and time variables
rem date var is sDate
rem time var is sTime
rem sDate and sTime should be put at the back of the file to be timestamped
rem the format would be filename_%sDate%_%sTime%
@Echo off
Set CURRDATE=%TEMP%\CURRDATE.TMP
Set CURRTIME=%TEMP%\CURRTIME.TMP
DATE /T > %CURRDATE%
TIME /T > %CURRTIME%
Set PARSEARG="eol=; tokens=1,2,3,4* delims=:/-, "
For /F %PARSEARG% %%i in (%CURRDATE%) Do SET sDate=%%k%%j%%i
Set PARSEARG="eol=; tokens=1,2,3* delims=:/-, "
For /F %PARSEARG% %%i in (%CURRTIME%) Do Set sTime=%%i%%j%%k
No comments:
Post a Comment