Create a file with the name as the current date (windows batch)
Create a file with the current date as filename (ex. 2008-11-08.dat)
echo hello > %date%.dat
With the current date but without the sperator "-" (ex. 20081108.dat)
echo hello > %date:-=%.dat
To use the current time we must remove the separator ":" because it's not permitted in a filename.
(ex. 20081108220221). Since %time% return also a ",", you can't specified an extension.
echo hello > %date:-=%%time::,=%
If you really an extension (ex. 2008110822022107.dat), try this
set x=%date:-=%%time::,=%.dat
set x=%x:,=%
echo hello > %x%