Skip to content

Instantly share code, notes, and snippets.

@RosayGaspard
Created October 21, 2016 12:11
Show Gist options
  • Save RosayGaspard/a8d281a1e46bb13af3278f284db7e619 to your computer and use it in GitHub Desktop.
Save RosayGaspard/a8d281a1e46bb13af3278f284db7e619 to your computer and use it in GitHub Desktop.
# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open user:password@example.com
# Connect
open ftp://user:password@my.ftp.org
# Force binary mode transfer
option transfer binary
# Upload the file to current working directory
put C:\PATH\TO\MY\file.csv
# Upload all matching files to current working directory
put C:\PATH\TO\ALL\*.csv
# Disconnect
close
# Exit WinSCP
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment