Here is one way I do it:

In Win2K or NT:

FOR /F "tokens=1,2,3,4 delims=/ " %%d IN ('date /t') DO FOR /F "tokens=1,2,3,4 delims=.: " %%t IN 'time /t') DO (
set MyDate=%%g%%e%%f
set MyTime=%%t%%u
)

Jerry

----- Original Message -----
From: "John Carter" <
[EMAIL PROTECTED]>
To: "IMail_Forum" <
[EMAIL PROTECTED]>
Sent: Tuesday, July 31, 2001 10:05 AM
Subject: [IMail Forum] Incrementing batch command


> Before I re-invent the wheel, I would like to know how others handle the
> changing of a command line argument within a batch file so it can run
> each day without manual editing.  Huh, what did he say?
>
> Situation:  Scott's DOMLIST program (others as well) uses an argument of
> the log file name. I would like to schedule a batch file to run each day
> and email me the results.  Each day the argument would change.  Example:
> today domlist.exe sys0731.txt; tomorrow domlist.exe sys0801.txt.
> Obviously the only thing that changes is the MMDD in the middle of the
> file name.  Has anyone developed a method of handling this?  Thanks.
>
> John
>
> Please visit
http://www.ipswitch.com/support/mailing-lists.html
> to be removed from this list.
>
> An Archive of this list is available at:
>
http://www.mail-archive.com/imail_forum%40list.ipswitch.com/
>

Reply via email to