Hi -
What you're asking can certainly be done.
But you might wish to consider an alternative like rsync:
http://everythinglinux.org/rsync/
You're aware that you can transfer multiple files in a single FTP connection, I assume. And "5000" really isn't that much. Even a relatively inefficient transfer method probably wouldn't put much of a burden either on the system or on your batch program.
IMHO .. PSM