Advertisement
guyrleech

Show file download time & rate

May 10th, 2021
1,580
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## Assuming file not modified since download, calculates time difference between file creation and modification time
  2. [int]$global:tt = 0; Get-ItemProperty "c:\downloads\summit.iso"|select @{n='Download duration (s)';e={$global:tt = (New-TimeSpan -start $_.CreationTime -End $_.LastWriteTime).TotalSeconds -as [int];$global:tt}},@{n='MB';e={[math]::Round( $_.Length/1MB, 1)}},@{n='MB/s';e={[math]::Round( ($_.Length/1MB)/$global:tt , 1)}},CreationTime,FullName
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement