Skip to content

Instantly share code, notes, and snippets.

@leonrinkel
Created February 11, 2022 11:57
Show Gist options
  • Save leonrinkel/bdb89ce6bab5834cd3a3ee491466ffd6 to your computer and use it in GitHub Desktop.
Save leonrinkel/bdb89ce6bab5834cd3a3ee491466ffd6 to your computer and use it in GitHub Desktop.
$from = 1
$to = 540
$url = "https://someurl/segment{}.ts"
$out = "segment{}.ts"
for ($i = $from; $i -le $to; $i++)
{
Invoke-WebRequest $url.Replace("{}", $i) -OutFile $out.Replace("{}", $i)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment