Screen Output plus Logging in batch file

Reply

Join Date: Nov 2007
Posts: 2
Reputation: richerich is an unknown quantity at this point 
Solved Threads: 0
richerich richerich is offline Offline
Newbie Poster

Screen Output plus Logging in batch file

 
0
  #1
Nov 1st, 2007
Hi

I want to run my batch script and at the same time print the echo's on screen as well as log them into a file. I could do it individually, i.e. either print the output on screen or log to a file but not both at the same time. How it can be achieved?

Any help is appreciated.

regards
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 1,763
Reputation: DimaYasny will become famous soon enough DimaYasny will become famous soon enough 
Solved Threads: 85
Moderator
Featured Poster
DimaYasny DimaYasny is offline Offline
Posting Virtuoso

Re: Screen Output plus Logging in batch file

 
0
  #2
Nov 1st, 2007
no way with a batch file, unless you want to try to parse the text log as it is being written
Real stupidity always beats Artificial Intelligence. (Terry Pratchett)

BA BizMg, MCSE, DCSE, Linux+, Network+
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2
Reputation: richerich is an unknown quantity at this point 
Solved Threads: 0
richerich richerich is offline Offline
Newbie Poster

Re: Screen Output plus Logging in batch file

 
0
  #3
Nov 1st, 2007
Hi Thanks a lot for the input. I would definetly use your idea, it looks promising. But luckily I use cygwin so I just created one more bat file and called the original as under;

file2.bat ! tee txt.log

regards
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 1,763
Reputation: DimaYasny will become famous soon enough DimaYasny will become famous soon enough 
Solved Threads: 85
Moderator
Featured Poster
DimaYasny DimaYasny is offline Offline
Posting Virtuoso

Re: Screen Output plus Logging in batch file

 
0
  #4
Nov 1st, 2007
well, you can't really expect me to guess that you'r batch files are run not under windows
Real stupidity always beats Artificial Intelligence. (Terry Pratchett)

BA BizMg, MCSE, DCSE, Linux+, Network+
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC