http://www.perlmonks.org?node_id=991566


in reply to Re^2: Net :: FTP
in thread Net :: FTP

as it throws error if I serach in the wrong directory and the execution stops, I cannot try in all the listed directories
Shouldn't be the case. You can always cd to directory and check for return codes of FTP list file command. It will tell you whether file exists or not. It won't terminate your program or your FTP session.
Bottomline, you'll have to cd to each directory and look for the file.

Replies are listed 'Best First'.
Re^4: Net :: FTP
by Anonymous Monk on Sep 04, 2012 at 09:03 UTC
    Thanks! but is it possible to use ftp Recursive for finding and returning the file i need, by searching all the subdirectories?
Re^4: Net :: FTP
by Anonymous Monk on Sep 04, 2012 at 09:05 UTC
    thanks! But is it possible to use something like FTP Recursive to search and return a file, recursively on all sub directories?
      FTPs job is to transfer files. It doesn't have recursive file searching abilities (at least it was so when I last worked with it). Check the FTP manual of server if it supports any such command.