Reputation: 91
i run into a following scenario
Ex: FTPSERVER/dir/file_name => /data/process/file_name
Ex: FTPSERVER/dir/file_name => FTPSERVER/dir/archive/file_name
I have to do this using shell script. I have completed the first part using
ncftpget -u $USER -p $PASS $HOST/DIR/$FILENAME
I dont know how to do the second part.. which is moving the file into archive DIR of FTP server...
could someone help me on this...
Thanks in advance...
Upvotes: 0
Views: 1560
Reputation: 19375
ftp -n $HOST <<EOF
user $USER $PASS
rename DIR/$FILENAME DIR/ARCHIVE/$FILENAME
EOF
Upvotes: 1