PoshCode Archive  Artifact Content

Artifact 36d04faeaccb7b16e356576145058844738ebcd39915b12727e1e8dfe3cf2ee4:

  • File ipaupload.ps1 — part of check-in [570596492c] at 2018-06-10 14:03:56 on branch trunk — quick hard coded script for uploading a file to an ftp server. (user: jiayuhui size: 565)

# encoding: ascii
# api: powershell
# title: ipaupload
# description: quick hard coded script for uploading a file to an ftp server.
# version: 0.1
# author: jiayuhui
# license: CC0
# x-poshcode-id: 5912
# x-archived: 2015-07-03T01:44:27
# x-published: 2015-06-29T03:49: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)