I do it by creating a script file that includes all the commands you want, then executing the script.
works great, except I haven't been able to get it to run "hidden" - ir when it runs it opens a cmd window, and echoes the script commands to that.
this sort of thing -this is aircode, so the synext may be off
ftp servername username password
put filename
quit