Created
February 8, 2015 10:18
-
-
Save VoidVolker/f67765e7eaf0b898bdc6 to your computer and use it in GitHub Desktop.
powershell ftp http get unzip get-unzip.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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