depending on what version of windows you are using, you may be able to use date/t.
I use the following as part of a script to name backup files. Not sure where I found it, but it works for me.
for /f "tokens=1-4 delims=/ " %%a in ('date/t') do (
set dow=%%a
set month=%%b
set day=%%c
set year=%%d
)
Ken
>Anyone know how to pass the current date into or use it in a DOS batch file.
>
>I will be running a batch file from the scheduler and would like to use the current system date within the batch file.
>
>TIA,
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only