Created
March 15, 2014 07:23
-
-
Save splitice/9563002 to your computer and use it in GitHub Desktop.
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
# WinSCP script for uploading a single file | |
# see http://winscp.net/eng/docs/scripting for documentation on WinSCP scripting | |
# Automatically abort script on errors | |
option batch continue | |
# Disable overwrite confirmations that conflict with the previous | |
option confirm off | |
# Connect to server (change this to match your connection settings) | |
open sftp://{USERNAME}:{PASSWORD}@{HOST} -hostkey="ssh-rsa 2048 ssh-rsa {HOSTKEY}" | |
# Change remote directory (change this to the desired directory on your server) | |
cd /var/www/image/ | |
mkdir %2% | |
cd %2% | |
# Upload the file to current working directory | |
put %1% | |
# Disconnect | |
close | |
# Exit WinSCP | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment