As the title says.
For example, there is a bat file. After it finishes running and pause is reached, I can Select All in the cmd window, copy it, and save it as text.
What I want is a way to save this text automatically.
An example will make it easier to explain.The example is only for illustration, not a request for a solution to this specific case.
Suppose there is a batch file that converts wav to flac.
flac.exe test.wav
While it runs, the screen keeps updating with the progress. When it finishes, it gives final information such as the final file size and compression ratio. (If that's not clear enough, please look at the pictures.
During run 1:

During run 2:

Final screen display:

This final screen display information is what I want.
If I use 2>log, then the file I get is something like this:
But what I want is what is shown in the final screen display, without so many lines in the middle, in a file in a format like this:
The above example is only for illustration, not a request for a solution to this specific case.
Is there any command or tool that can do this?
Please advise. Thanks.
PS, what I want is to get such a file directly, not to process the log with a tool after it finishes.
[ Last edited by noe on 2009-2-8 at 23:07 ]
For example, there is a bat file. After it finishes running and pause is reached, I can Select All in the cmd window, copy it, and save it as text.
What I want is a way to save this text automatically.
An example will make it easier to explain.The example is only for illustration, not a request for a solution to this specific case.
Suppose there is a batch file that converts wav to flac.
flac.exe test.wav
While it runs, the screen keeps updating with the progress. When it finishes, it gives final information such as the final file size and compression ratio. (If that's not clear enough, please look at the pictures.
During run 1:

During run 2:

Final screen display:

This final screen display information is what I want.
If I use 2>log, then the file I get is something like this:
flac 1.2.1, Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.
wavtest.wav: 3% complete, ratio=0.251
wavtest.wav: 5% complete, ratio=0.280
wavtest.wav: 7% complete, ratio=0.279
...middle omitted
wavtest.wav: 95% complete, ratio=0.450
wavtest.wav: 98% complete, ratio=0.452
wavtest.wav: wrote 4770849 bytes, ratio=0.445
But what I want is what is shown in the final screen display, without so many lines in the middle, in a file in a format like this:
flac 1.2.1, Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.
wavtest.wav: wrote 4770849 bytes, ratio=0.445
The above example is only for illustration, not a request for a solution to this specific case.
Is there any command or tool that can do this?
Please advise. Thanks.
PS, what I want is to get such a file directly, not to process the log with a tool after it finishes.
[ Last edited by noe on 2009-2-8 at 23:07 ]

