Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
HI, I am trying to write a batch file that will name a file with the current date, preferably the day. I am running win2K.
Thanks,
David.

Now THAT's a batch FAQ =D
Use this to get the actual date to the variable %date%. I leave the rest to you.
@echo off
echo. |date |find "Current"> $$out.bat
echo SET DATE=%%4> current.bat
call $$out.bat
del $$out.bat
del current.bat
if that doesn't work, try this:
@echo off
rem > $^getd^$.tmp
echo set dircmd=%dircmd%> $$resdir.bat
dir |find /i "$^getd^$"> $$out.bat
echo set date=%%3> $^getd^$.bat
call $$out.bat
call $$resdir.bat
del $$out.bat
del $$resdir.bat
del $^getd^$.tmp
del $^getd^$.bat
That's it.-- Secret_Doom --
secret_doom@hotmail.com
secretdoom.hpg.com.br

![]() |
Dos 6.0 Restore Utility
|
windows95
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |