Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Apparently, it doesn't work if you try to do a unix-like fetch, using *.txt. My problem is that I don't know all the names of the text files, so I must use some with a wild-character use. Any other suggestions?use Net::FTP; $ftp = Net::FTP->new("SERVER_NAME", Debug => 0) or die "Cannot connect + to the server: $@"; $ftp->login("anonymous",'-anonymous@') or die "Cannot login ", $ftp->m +essage; print "Succesfully connencted to the server...\n"; $ftp->cwd("/downloads/pub") or die "Cannot change working directory ", + $ftp->message; $ftp->get("*.txt") or die "get failed ", $ftp->message; $ftp->quit;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to fetch all files with a given name from an FTP server
by Anonymous Monk on Sep 01, 2010 at 11:05 UTC | |
|
Re: How to fetch all files with a given name from an FTP server
by Utilitarian (Vicar) on Sep 01, 2010 at 11:06 UTC | |
|
Re: How to fetch all files with a given name from an FTP server
by marto (Cardinal) on Sep 01, 2010 at 11:13 UTC | |
|
Re: How to fetch all files with a given name from an FTP server
by Anonymous Monk on Sep 01, 2010 at 11:06 UTC |