Skip to content

Instantly share code, notes, and snippets.

@thykka
Created August 26, 2014 10:54
Show Gist options
  • Save thykka/82b0a567b199f3f84a66 to your computer and use it in GitHub Desktop.
Save thykka/82b0a567b199f3f84a66 to your computer and use it in GitHub Desktop.
set FTP_hostname=12.34.56.78
set FTP_username=1337h4x0r
set FTP_password=rosebud
set FTP_remote_dir=screenshots
echo user %FTP_username%> ftpcmd.dat
echo %FTP_password%>> ftpcmd.dat
if defined FTP_remote_dir (
echo cd %FTP_remote_dir%>> ftpcmd.dat
)
echo put %1>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat %FTP_hostname%
del %1
del ftpcmd.dat
set FTP_username=
set FTP_password=
set FTP_remote_dir=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment