Automated FTP

Taking care of your Linux box.
Post Reply
refra
Naik
Posts: 70
Joined: Wed Dec 06, 2006 3:51 pm

Automated FTP

Post by refra »

AOA,

I need a help about automated FTP process. scenario is

find a latest files according to the time stamp in /home/abc ; /d01/uat ; /demo/seen and upload all the files on ftp server according to date wise.

i find a latest file according to

#############################################################
DAT=`date '+%d-%b-%Y'`

find /home/abc /d01/uat /demo/seen -type f -newer chk >> logfile
cat logfile | while read FILES
do
lftp -u userid,passwd ftpserverip <<EOF
mkdir $DAT
cd $DAT
put $FILES
EOF
done
##################################################################
It executed perfectly, but gives a error like:

mkdir: Access failed: 550 26-Dec-2013: Cannot create a file when that file already exists
mashkoor.qadir
Lance Naik
Posts: 32
Joined: Mon Dec 20, 2010 10:27 pm
Location: Karachi
Contact:

Re: Automated FTP

Post by mashkoor.qadir »

it seems ftp user doesn't have permission on the directory.
Kind Regards,
Mashkoor Qadir,
mashkoor.qadir@yahoo.com
http://www.redmath.com
nomankhn
Colonel
Posts: 714
Joined: Wed Aug 07, 2002 8:00 pm

Re: Automated FTP

Post by nomankhn »

It is clearly mentioned in your message. Please check your ftp server directory name, it looks like that directory is already exist.

Code: Select all


mkdir: Access failed: 550 26-Dec-2013: Cannot create a file when that file already exists

Post Reply