Well, since ftp is an automated process, you could use basic shell scripting, but I personally think one of the safest ways (error handling, etc) wou be to use Expect...
It could be done using here-docs in ksh/bash, though...
For example:
#! /bin/ksh
sitename=ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-current/tar_files/
ftp -in <<-_EOF_
open ftp.netbsd.org
user anonymous email@address.com
cd pub/NetBSD/NetBSD-current/tar_files
[whatever goes here]
bye
_EOF_
cd /where/ever
do_some_stuff
If so inclined you could put some error handling in there, but that will basically do it for you...
You could also use wget or a similar utility to get files from ftp, then process locally...