# encoding: ascii
# api: powershell
# title: FTP upload
# description: quick hard coded script for uploading a file to an ftp server.
# version: 0.1
# author: Stephen Price
# license: CC0
# x-poshcode-id: 5940
# x-archived: 2015-07-24T03:26:35
# x-published: 2015-07-21T22:16:00
#
#
$File = "D:\Dev\somefilename.zip"
$ftp = "ftp://username:password@example.com/pub/incoming/somefilename.zip"
"ftp url: $ftp"
$webclient = New-Object System.Net.WebClient
$uri = New-Object System.Uri($ftp)
"Uploading $File..."
$webclient.UploadFile($uri, $File)