I'm running into a little problem here and I'm hoping some can provide a resolution here.
I'm trying to execute a program and redirect the output to the STDOUT AND to a file. This is much like the TEE command in Unix but I'm doing it in Windows and Windows does not have a TEE like command.
The closest I have gotten is like this:
dir \\127.0.0.1\c$\temp | FOR /F "tokens=1* delims=]" %A in ('FIND /N /V ""') DO >> c:\mytest.log ECHO %B
The resulting file looks great but the STDOUT information is problematic because it is not formatted very well and one sees the echo statements.
How can this be addressed?
Any assistance is greatly appreciated.
Thanks!
Start Free Trial