Display progress bar in command line ?

Advertisement

Cbs
Guest

Display progress bar in command line ?

Hello,

i'm using winscp in command line in my application.
It is possible to know what's is doing winscp to display a progress bar for example or the name of the file is copying during the synchronization ?
After having open the session with /console option, it's impossible to send another command to winscp without "winscp.exe" or "winscp.com".
Sorrye for my English...

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: Display progress bar in command line ?

Cbs wrote:

It is possible to know what's is doing winscp to display a progress bar for example or the name of the file is copying during the synchronization ?
You can capture output of winscp.com and interpret it. But it won't work if you want to display progress of transfer of single file.

Reply with quote

filledvoid
Guest

Would it be possible to add a command line option to winscp.com that would cause it to output each progress line separately, instead of waiting until the file is done before writing the line? For example, adding the /progressoutput option would result in output something like this (fake numbers):

winscp.com /progressoutput /script=syncscript.txt

Active session: [1] user@somewhere
Comparing...
Local 'C:\SomeDir' <= Remote '/home/user/somedir'
Synchronizing...
Local 'C:\SomeDir' <= Remote '/home/user/somedir'
SomeFile.bin | 0 KiB | 0.0 KiB/s | binary | 0%
SomeFile.bin | 150 KiB | 75.2 KiB/s | binary | 5%
SomeFile.bin | 300 KiB | 76.2 KiB/s | binary | 10%
SomeFile.bin | 500 KiB | 74.2 KiB/s | binary | 15%
...

This way scripts can parse each progress line and do something useful while the file is downloading.

fv

Reply with quote

Advertisement

You can post new topics in this forum