------------------
for /F "tokens=1,2,3,4 delims=/ " %%i in ('date/t') do set d=%%i-%%j-%%k
for /F "tokens=1,2 delims=:" %%a in ('time/t') do set t=%%a-%%b
echo %d%
echo %t%
------------------
this is what I use in a batch file to copy and rename files so that they get a date and time stamp.
Jonathan