in reply to Using NET::FTP with Unkown File Names

No Net::FTP does not support wildcards directly, but Net::FTP has an ls method that you can use to get a list of files on the remote server. Then just loop through this list and download them...
use Net::FTP; $ftp = Net::FTP->new("some.host.name", Debug => 0); $ftp->login("anonymous",'me@here.there'); $ftp->cwd("/pub"); my @l=$ftp->ls(); foreach(@l){ $ftp->get($_); } $ftp->quit;
be sure to add error checking code to the above for "real live" use

Replies are listed 'Best First'.
Re: Re: Using NET::FTP with Unkown File Names
by mikeB (Friar) on Jul 07, 2001 at 00:11 UTC
    As an additional sanity check, you may want to add something like
    if ( $ftp->size($remoteFileName) <> -s $localFileName) { die "file size mismatch\n"; }
    after the transfer. We have seen cases where the get() succeeded but the file was not complete.