1.

Solve : How to save the text using >?

Answer»

Hello,

I'm trying to write a program which will launch a .exe from CMD, and using the > command capture the text. The only problme I have is after AWHILE the text file will become very large. I need to figure out how to save the file after a while without stopping and start the .exe again

Thanks for any help This is not possible (PROBABLY, Im sure SOMEONE will come up with a smart way of doing it!!)

However - if you are not interested in the contents of the file, just redirect the output to the device NUL (>NUL) which just loses the output.

If you are only interested in some of the output, filter it with FindStr
mycommand.exe|findstr 'parameters'> mytext.txt

'parameters' is obviously replaced by your conditions for selecting lines

Graham

May be you could create 2 files:

One for standard outpur >
Other for ERROR 2>Not entirely sure this will work but try it:

Start "' "C:\path\to\file.exe" >> "%userprofile%\desktop\log.txt"



Discussion

No Comment Found