Take the tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have created a batch file with 2000 lines of code and which will peroform various operations in my daily work. For this batch file I have to give some inputs to enable/disable some of the operations. Finally the batch file is ready and working fine.

But I want to have a log file in which everything which is coming on the command window should be logged, including the inputs that I have given to the batch file and also the execution process.

Is there any way do like this? Any one of you can help me?

Thanks in advance... Nagaraju

share|improve this question
 
Hello all, Can any one please help me... –  Nagaraju Sabbani May 7 at 9:18
add comment

1 Answer

You are not telling how you are invoking the batch file. You could try adding redirection to the command line (batchfile.bat > filename.log), although that won't catch whatever you type in as input. You could, however, change the script to print out the input parameters so that they could be caught in the log file.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.