Last active
August 29, 2015 13:57
-
-
Save mvark/9659595 to your computer and use it in GitHub Desktop.
PowerShell script to download a list of files that have a predictable number pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PowerShell script to download a list of files that have a predictable number pattern | |
for ($i=1; $i -le 10; $i++) | |
{ | |
$startTime = (Get-Date) | |
# Download files that have the naming format File1.txt, File2.txt etc.. | |
(new-object System.Net.WebClient).DownloadFile("http://example/file$i.txt","C:\temp\file$i.txt") | |
$endTime = (Get-Date) | |
# Echo Time taken | |
"Time taken to download file$i : $(($endTime-$startTime).totalseconds) seconds" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment