Last active
January 7, 2022 03:11
-
-
Save dalegaspi/e007057cac607f6725f5 to your computer and use it in GitHub Desktop.
FTP with PowerShell using built-in Windows FTP client
This file contains 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
# as discussed here: http://stackoverflow.com/questions/1867385/upload-files-with-ftp-using-powershell | |
$server = "ftp.lolcats.com" | |
$filelist = "file1.txt file2.txt" | |
"open $server | |
user $user $password | |
binary | |
cd $dir | |
" + | |
($filelist.split(' ') | %{ "put ""$_""`n" }) | ftp -i -in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment