How to make log of batch file process

November 28, 2010 at 15:51:48
Specs: Windows XP SP3
I am wanting to make a batch file for logging another batch process.
ie:
REM*****************************************************

for /f %%i in (computers.txt) do call :Reboot %%i
:Reboot
shutdown /m \\%1 /r /t 0 /f
REM*****************************************************

I need the log to show the machine it is rebooting and if any errors are given like the device is not found.
I am trying to make a generic way that I can insert the log process where if I run a batch similar to this, I would basically like to log everything that is displayed on the screen.

Thanks,
Nathan


See More: How to make log of batch file process

Report •


#1
November 28, 2010 at 16:05:32
You might get by with:

shutdown /m \\%1 /r /t 0 /f >> log

If not post output of shutdown /m \\%1 /r /t 0 /f


=====================================
Life is too important to be taken seriously.

M2


Report •
Related Solutions


Ask Question