Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement