full script to achieve move more than one file
get file list from ftp server with mls command
generate to do list file
2.1 get file
2.2 rename (move file)execute ftp command with to do list file
#!/bin/sh clear
change local directory
cd [local-directory]
#collect file names ftp -ni ftp.abccompany.com <<EOF user [user] [password] cd /OUT mls abc*.* list.txt quit EOF
create ftp action list
echo >>todo.lst user [user] [password] while read N do echo >>todo.lst cd /OUT echo >>todo.lst get $N echo >>todo.lst rename $N ARCHIVE/$N done <list.txt
echo >>todo.lst quit
ftp transfer process
ftp -nv ftp.abccompany.com <todo.lst
cleanup
rm todo.lst