Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Can you please help.use Net::FTP; use File::Copy; $Login = "abc"; $Pwd = "pwd"; $ftpHost = "10.23.2"; $ftpFolder = "F1"; $matchPattern = "Jeeves"; $LocalDirectory = \etc\local; $ftp=NET::FTP->new($ftpHost,Timeout=>100); $ftp->login($Login,$Pwd); $ftp->cwd($ftpFolder); # to find files that match the pattern @files = grep /$matchPattern/, $ftp->dir foreach(@files) { print $_; # Successfully prints the filename, but with all the details like perm +issions date created etc. # I need to write a code that helps me get this file out into a local +directory # I need to then delete the file. }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: FTP - Download Multiple Files Matching Pattern
by tokpela (Chaplain) on Aug 17, 2009 at 11:07 UTC | |
|
Re: FTP - Download Multiple Files Matching Pattern
by Bloodnok (Vicar) on Aug 17, 2009 at 11:05 UTC | |
|
Re: FTP - Download Multiple Files Matching Pattern
by dwm042 (Priest) on Aug 17, 2009 at 19:16 UTC | |
|
Re: FTP - Download Multiple Files Matching Pattern
by belg4mit (Prior) on Aug 19, 2009 at 03:40 UTC |