Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

is there a way to display the file progress percentage even when the copy is being done through a pipe?

Jul
244
6
Currently there is not. I assume that perhaps the powers that be had to check if it is being piped, and turn off the direct writes? Either that, or somehow, piping destroys them. But I'm trying to get them to basically evade the pipe. Just the percentage progress, nothing more.
 
Currently there is not. I assume that perhaps the powers that be had to check if it is being piped, and turn off the direct writes? Either that, or somehow, piping destroys them. But I'm trying to get them to basically evade the pipe. Just the percentage progress, nothing more.

How are you copying through a pipe? (Exact syntax please.)

Not sure what you mean by "direct writes". But the percentage copied display comes from the Windows CopyFileEx API callback. And it's going to be written to STDOUT, so if you're redirecting / piping STDOUT somewhere you won't see it.
 
It's on my mind a lot I guess.

The direct writes were just speculation.

The syntax I use is:

*copy whatever.txt c:\wherever |& postprocessor.py
 
You're not gonna believe this, but postprocessor.py has been in use for months, handles input character by character, and doesn't seem to receive these characters.

At this point I'm looking at the python code, wondering where they could be disappearing to. Could sys.stdout.flush() be discarding them somehow? Or maybe somewhere else in my code?

It's pretty simple... Random colors, emojis, double-height lines...

 

Similar threads

Back
Top