magento
asked on
Shell help ftp retry
Hi Experts,
I am getting file values as argument in the format 1.txt,2.txt,3.txt
Loop for all txt_files
exec procedure sp_book_cnt
If returnStatus=Y
ftp txtfile
echo "FTP Success"
Else
sleep 60
goto procedure sp_book_cnt until File ftp success or until returnsflag=N
sp_book_cnt will check for retry cnt, if its >10 it should send status (returnFlag) as N.
How can i achieve this?
Thanks,
Magento
I am getting file values as argument in the format 1.txt,2.txt,3.txt
Loop for all txt_files
exec procedure sp_book_cnt
If returnStatus=Y
ftp txtfile
echo "FTP Success"
Else
sleep 60
goto procedure sp_book_cnt until File ftp success or until returnsflag=N
sp_book_cnt will check for retry cnt, if its >10 it should send status (returnFlag) as N.
How can i achieve this?
Thanks,
Magento
Why not use wget?
ASKER
Sorry for late response ..
How can wget solve my issue , also please be advice i was supposed to use FTP in my project.
How can wget solve my issue , also please be advice i was supposed to use FTP in my project.
Check -c option for wget
You can have many different shining FTP downloaders, like curl, ncftp or aria2, or replacements like rcp, or secure replacements like scp or rsync.
You can have many different shining FTP downloaders, like curl, ncftp or aria2, or replacements like rcp, or secure replacements like scp or rsync.
ASKER
Hi Gheist,
Sorry i dont understand ur points on different FTP downloaders. My question is how to handle the ftp count.
Say i send a first book 1.txt to another server via ftp command . If its success i will process next book 2.txt.
If 1.txt fails, i will try reftp the file until its success but only reftp 10 times . If still 10 times fails, it should throw error.
How can i do this in shell scripting.?
Thanks
Sorry i dont understand ur points on different FTP downloaders. My question is how to handle the ftp count.
Say i send a first book 1.txt to another server via ftp command . If its success i will process next book 2.txt.
If 1.txt fails, i will try reftp the file until its success but only reftp 10 times . If still 10 times fails, it should throw error.
How can i do this in shell scripting.?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.