wget with Windows PowerShell

You will need: Windows PowerShell

Enable script execution:
  1. Open powershell as administrator.  
  2. Check the status of script execution:
  3. Most  likely it will report Restricted. In that case you need to change (for this purpose you needed administrative privilege) the status to allow script execution. Type:
    Set-ExecutionPolicy RemoteSigned
    Note that this is the minimal allowance for scripts. For more info look here.
The script:
Here's a script that emulates wget. It has an option for iteration.
$client = new-object System.Net.WebClient
foreach ($counter in < start > .. < end >)
   $source="< part of web address before counter >"+$counter+"< rest of the web
address >"
   $destin="< path of destination before counter  >"+$counter+"< rest of the path >"
$counter controls the iteration. Multiple counters can be used. The text in <...> along with the < & > symbols need to be supplanted by actual data of interest.

No comments:

Post a Comment