Skip to content

Instantly share code, notes, and snippets.

@CyberBison
Created October 21, 2016 12:11
Show Gist options
  • Select an option

  • Save CyberBison/a8d281a1e46bb13af3278f284db7e619 to your computer and use it in GitHub Desktop.

Select an option

Save CyberBison/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:[email protected]
# Connect
open ftp://user:[email protected]
# 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