suppose one file comes in one sever location on MOnday.we have to write a script to automatically get that files and put it in different server location.
---------- Post updated at 10:28 AM ---------- Previous update was at 10:27 AM ----------
ftp -v -n $FTP_SERVER << EOF | tee $LOGFILE
user $FUSER $FPASS
cd $FILE_LOCATION
dir $FILE_TO_BE_FTPD
quit
EOF
grep $FILE_TO_BE_FTPD $LOGFILE
if [ $? -eq 0 ]
then
echo "FOUND FILE"
ftp -v -n $FTP_SERVER
user $FUSER $FPASS
cd $FILE_LOCATION
get $FILE_TO_BE_FTPD
quit
EOF
else
echo "File not found "
fi