So you know how to use command line ftp clients, but you're not sure how to automate them with scripts.
ftp -s:script1.txt 22.214.171.124
where username is the ftp username, password is their password. ftp command1 is any command line ftp commands like "get filename.zip" (download) or "put filename.rar" (upload).
Now its less important what the contents of the script are, and more important how to execute the script because once you know how, you can go use the commandline ftp client to run through whatever you want to automate, and make sure you have one command per line.
The only differences with the next command are that the hostname is embedded inside the script, and I replaced hostnames, usernames and passwords (etc) with more real examples.
At the linux shell (command-line) type this command.
ftp < script2.txt
Because linux just uses i/o redirection, with the < symbol, one should use the format of script2 where the first line of the file is 'open [hostname]'.
USEFUL FTP COMMANDS
sources: http://support.microsoft.com/?kbid=96269 and http://www.reallylinux.com/docs/autoftp.shtml