Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

HrHauptfeld

Yeah. Thanks.
Works like a charm :)

I just modified the function a little so that I have everything in just one progressbar.

function FileTransferProgress
{
   param ($e)
   
   Write-Progress `
               -Id 0 -Activity "Downloading" -CurrentOperation ("$($e.FileName) - {0:P0}" -f $e.FileProgress) -Status ("{0:P0} complete at $($e.CPS) bps" -f $e.OverallProgress) `
               -PercentComplete ($e.OverallProgress * 100)
}
HrHauptfeld

Show ProgressBar in PowerShell for SynchronizeDirectories download

Hello every1,

I'm trying to create a small powershell script to make my life a bit easier. I'm currently using the following script to sync a local directory with my remote folder and delete the remote files after the DL which works great: https://winscp.net/eng/docs/library_example_delete_after_successful_download

But now I'd like to implement an extra progress bar for the download, just to have a visual confirmation that the script is still running if there are a LOT files to DL.

All the examples I could find (involving FileTransferProgress) only produce text output which I'd like to avoid.

Is there any way to utilize Write-Progress for a nicer output of the download? The progress bar should advance for every file that's been downloaded successfully.
PS: It doesn't have to work with the Synchronize option. GetFiles would also work for me.

Thanks