Jump to content

How to log output of batch scripts...


Recommended Posts

I need to know is there any chance to easily log all output of executed batch sctipts to lof files.

I want to check if bach scripts executed have any errors while executing...

sory for my bad english :rolleyes:

Link to comment
Share on other sites


Call the batch file from another batch file like so...

>>%systemdrive%\error.log yourbatchfile.bat

this should work as well

yourbatchfile.bat > %systemdrive%\error.log

that will create a logfile in the root of your system drive.

It will log all output not just errors.

The file can have any extension like .txt ...

You can also use echo to send text to the log file like

>>%systemdrive%\error.log echo bla bla bla

Edited by jaws75
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...