Get filesize or size downloaded during file PowerShell transfer
I am using the
That all works great. What I was wondering if there was a way to display the amount of data downloaded while the files is transferring and/or the total size of the current file being transferred? Thanks!
FileTransferProgressEventArgs
class with Filename
, FileProgress
, and CPS
properties to display the name of the name, the percentage complete, and the transfer speed. I just followed the example using this line of code from one of the examples:
# Print transfer progress Write-Host -NoNewline ("`r{0} ({1:P0})" -f $e.FileName, $e.FileProgress)