Computer Hope

Microsoft => Microsoft DOS => Topic started by: Colin McDonald on November 12, 2004, 05:18:43 AM

Title: Batch Log File
Post by: Colin McDonald on November 12, 2004, 05:18:43 AM
Does anyone know of a way to capture all the echo'd commands etc that are reported on screen during the running of a batch file.

I would like to keep a log of each step of what one of my files is doing each time it is run

Thanks
Title: Re: Batch Log File
Post by: MalikTous on November 12, 2004, 08:22:21 AM
In Win9x and earlier, you had a command 'Mode.com'.

mode con: c:\logfiles\logfile.txt
(batch file)
mode con: con:

You can either manually rename each log file or attach a code to name them different things so they don't overwrite each other.

I don't know if NT/XP offers 'Mode' support.
Title: Re: Batch Log File
Post by: Colin on November 18, 2004, 05:19:16 AM
Just tried that, and it doesn't seem to work

I used

mode con: d:\admin\logfile.txt

It told me that mode was not recognised.

Thanks anyway

Title: Re: Batch Log File
Post by: merlin_2 on November 18, 2004, 07:16:56 AM
http://www.computerhope.com/batch.htm

http://www.robvanderwoude.com/index.html