Computing.Net > Forums > Programming > create a log for a batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

create a log for a batch file

Reply to Message Icon

Name: propache
Date: March 27, 2009 at 12:07:32 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

i created a batch file.
it goes to different locations on computers, checking file existence and then does some operations like, decrypting, unzipping, splitting etc.
What i actually need is to create a log of all the operations the batch does.
it will be scheduled to run at 30 min from 9am to 9pm, and i need a log to be created on each run.

IT's not a homework project.
Hope you can help,



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: March 27, 2009 at 14:14:37 Pacific
Reply:

There is no way to trap a log out of the blue running a batch script. You need patiently to walk through your code and add echo commands or redirect the output of tools involved into a log file planned for that purpose.


0

Response Number 2
Name: Razor2.3
Date: March 27, 2009 at 16:26:48 Pacific
Reply:

Step 1: Remove @ECHO OFF
Step 2: Run your script like this: YourScript >> YourLog 2>&1


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: create a log for a batch file

Help coding a batch file www.computing.net/answers/programming/help-coding-a-batch-file/17125.html

Create a batch file for CruiseControl.NET www.computing.net/answers/programming/create-a-batch-file-for-cruisecontrolnet/19221.html

Robocopy function in a batch file www.computing.net/answers/programming/robocopy-function-in-a-batch-file/13172.html