Advertisement‎ > ‎

set filename wit date and progressive number.cmd

posted Feb 3, 2011, 3:15 PM by Roberto Felicini

:: set variables
set tdtd=none
set ttrn=none
:: get the date and time and then into single variable
for /F "tokens=2-4 delims=/ " %%i in ('date /t') do set tdtd=%%i%%j%%k
for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set ttrn=%%i%%j%%k%%l
rem set tufn=%tdtd%%ttrn%.txt
set tufn=%tdtd%.txt
:: now create the file
type NUL>%tufn%
:EOF

Comments