Need help in ftp script

hello ,

I am working on a FTP script which navigates to specific directory and pulls the file

Issue which i am facing ::
----------------------------

i) When there is a file it pulls the file , but when there is not file in the directory it fails in the same statement and it is not proceeding further ,

cd /$xxx1
lcd "$xxxY"
get $xxxre
cd /xxx2
lcd "$xx4r3"
bin
get $xxewq
 bye
EOF

when it goes to $xxx1 directory , and look for the file , the file doesnot exists which is fine for me ,

I need is that the script should move forward if none files are present in the directory , it should not fail .

Please help !!

You can use "ls" command to check whether file is exist in the directory or not.

Thanks for your reply,

I am not actually concerned whether the file is present or not , if it is not able to get the file , it has to just skip and move on ,

but the script which i gave you already doesnot do that , i am not sure what is wrong in that script.

Thanks again

Split the request into two ftp sessions, one for the ascii file, and one for the binary file.