By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,246 Members | 1,451 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,246 IT Pros & Developers. It's quick & easy.

Reading output from command line program - FLAC

P: n/a

I try to create a small program to handle the FLAC
<> (commandline) encoder or decoder and
intend to read its command line output during the process like that:

while (...)
_flac_output = _flac_process.StandardError.ReadLine
End While
Then I want to use some regular expressions to get the current progress
of encoding/decoding and other info from the output strings which look
like that:

test:wav 13% complete, ratio=0,5

The problem is, that the FLAC encoder does not create any newlines
unlike cdrdao for example. It only refreshes the values for "ratio" and
"complete" in the same line. So when using the method above, the first
ReadLine happens not until _flac_process is finished. Then it reads all
lines at once, but that of course does not reflect the current status,
since it is already finished at this moment.
Does anyone know how to read the output in those cases?

Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.