Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save VoidVolker/f67765e7eaf0b898bdc6 to your computer and use it in GitHub Desktop.
Save VoidVolker/f67765e7eaf0b898bdc6 to your computer and use it in GitHub Desktop.
powershell ftp http get unzip get-unzip.ps1
# Download the file to a specific location
# get-unzip.ps1 "ftp://path/filename" "C:\path" "filename"
$clnt = new-object System.Net.WebClient
$url = $args[0]
$folder = $args[1]
$file = $args[2]
$path = $($args[1]+"\"+$args[2])
$clnt.DownloadFile($url,$path)
# Unzip the file to specified location
$shell_app=new-object -com shell.application
$zip_file = $shell_app.namespace($path)
$destination = $shell_app.namespace($folder)
$destination.Copyhere($zip_file.items())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment