Skip to content

Instantly share code, notes, and snippets.

@guitarrapc guitarrapc/DownloadJob.ps1
Last active May 27, 2018

What would you like to do?
PowerShellっぽく陸上自衛隊のイラク派遣日報をまとめてダウンロードしてみる (同期処理)
(Invoke-WebRequest -Uri | Where {$_.EndsWith(".pdf")} | Sort-Object -Unique -PipelineVariable pdf | ForEach{ Start-Job {param($uri,$file,$path) cd $path; Invoke-WebRequest -Uri $uri -OutFile $file} -ArgumentList $pdf,$pdf.Split("ichikijiatesi/").Replace("/","_")[1]),$pwd}
(Invoke-WebRequest -Uri | Where {$_.EndsWith(".pdf")} | Sort-Object -Unique | ForEach {Invoke-WebRequest -Uri $_ -OutFile ($_.Split("ichikijiatesi/").Replace("/","_"))[1]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.