# batch output logging and display



## SGT_awesomesauce (Aug 8, 2009)

Hi, 
I am making a script that will update my games svn addons automatically and i am trying to make it output to a log file while still showing everything on the console. any help is appreciated.


----------



## Squashman (Apr 4, 2003)

yourbatch.bat >output.log >con


----------



## SGT_awesomesauce (Aug 8, 2009)

thanks, so i can get rid of the append commands in the original right?


----------



## Squashman (Apr 4, 2003)

Yes.
By launching your batch file this way we are redirecting stanadard output to a text file and the console.


----------



## Squashman (Apr 4, 2003)

Ah hold on. That's not right.


----------



## SGT_awesomesauce (Aug 8, 2009)

so i tried it and everything came out fine on the console but only what i edited to have only >output.log showed up on my logfile. btw im running vista 64 if that makes diff


----------



## SGT_awesomesauce (Aug 8, 2009)

ya it just puts it to the logfile and then takes it back out
mabye a print statement?


----------



## Squashman (Apr 4, 2003)

You can't redirect console output in batch without a 3rd party utility. In the unix world we would use TEE. There are windows ports of TEE to do this.


----------



## SGT_awesomesauce (Aug 8, 2009)

i found something that works. i attached the zip file. thanks for your help


----------



## Squashman (Apr 4, 2003)

I already have TEE. I have all the GNU Utilities on my PC. I originally was a unix person and did a lot of shell scripting with that. Not sure why it took me so long to remember that.
Either one of these should work for you.
http://unxutils.sourceforge.net/ (I use this one)
http://gnuwin32.sourceforge.net/


----------



## SGT_awesomesauce (Aug 8, 2009)

ok thanks well its all working great now.


----------

