Archived from groups: microsoft.public.win95.general.discussion,microsoft.public.basic.dos (More info?)
Hi :
I have a batch file doing many tasks. I'd like to show how long it has taken
for the batch file to complete all the tasks. I'd like to print out the
start time and end time at the END OF the batch file.
I know "time /t" will print out the current time, but do not know how to
make a variable to store the start time (at the start of the batch file) and
then print it out at the end of the batch file.
Archived from groups: microsoft.public.win95.general.discussion,microsoft.public.basic.dos (More info?)
Polaris wrote:
> Hi :
>
> I have a batch file doing many tasks. I'd like to show how long it has taken
> for the batch file to complete all the tasks. I'd like to print out the
> start time and end time at the END OF the batch file.
>
> I know "time /t" will print out the current time, but do not know how to
> make a variable to store the start time (at the start of the batch file) and
> then print it out at the end of the batch file.
>
> Thanks In Advance !
> Polaris
This group is about BASIC language.
Try alt.msdos.batch for an answer.
Archived from groups: microsoft.public.win95.general.discussion,microsoft.public.basic.dos (More info?)
On Fri, 3 Jun 2005 11:49:28 -0700, "Polaris" <etpolaris@hotmail.com>
wrote in microsoft.public.basic.dos:
>I have a batch file doing many tasks. I'd like to show how long it has taken
>for the batch file to complete all the tasks. I'd like to print out the
>start time and end time at the END OF the batch file.
>
>I know "time /t" will print out the current time, but do not know how to
>make a variable to store the start time (at the start of the batch file) and
>then print it out at the end of the batch file.
This might work:
FOR /F "tokens=*" %%i IN ('TIME /T') DO SET starttime=%%i
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.