Only use first console line (Windows) to output things?
Posted: Wed Jan 06, 2021 4:14 pm
Hello,
I'm currently working on a console app that should provide some progress output.
It's working with (large) folder structures but what I don't want it to spam the whole console line by line for each folder processed.
Is it possible to just use output a progress report to the first line (of the console), clear that line and use it again when the next progress report is due?
If the output must be wrapped because it's too long, that part would need to be cleared as well...
Go(lang) has a nice library which does it inside the Windows console (https://github.com/vbauerster/mpb) so I guess there is a way in PB, too?
I'm currently working on a console app that should provide some progress output.
It's working with (large) folder structures but what I don't want it to spam the whole console line by line for each folder processed.
Is it possible to just use output a progress report to the first line (of the console), clear that line and use it again when the next progress report is due?
If the output must be wrapped because it's too long, that part would need to be cleared as well...
Go(lang) has a nice library which does it inside the Windows console (https://github.com/vbauerster/mpb) so I guess there is a way in PB, too?