thesavo

Untitled

Mar 9th, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cd M:\Files\Netcasts\ShowName       # switch to the diretory to store your content
  2. Import-Module BitsTransfer          # enable BITS on host machine as a file transfer method
  3. $start=47                   # start epidode number
  4. $end=170                    # end epidode number
  5. $url="http://download.domain.com/episodes/" # URL of the download up to the directory containing the content
  6. $file_base="Podcast-"           # this is the filename of the download without the show number
  7. $file_ext=".ogg"
  8. for($i=$start;$i -le $end;$i++)         # start the loop, and run until end of range, incrementing by one
  9. {
  10.     $b="{0:D3}" -f $i               # cast loop counter to a string, stored as a formated number with leading zeros, example 002
  11.     $file="$file_base$b$file_ext"       # Concatenatesthe file name with formated loop counter + file extension
  12.     Start-BitsTransfer -source $url$file;   # download trigger,
  13. }
Advertisement
Add Comment
Please, Sign In to add comment