set filename wit date and progressive number.cmd

Post date: Feb 3, 2011 11:15:55 PM

:: 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%