Hi,
I need to fetch certain files from the server which has multiple subdirectories. How do i do it with NET FTP in Perl.
Example : \home\code\test and home\code\prod
I need to search for files under code (the file may be present in 'test' or 'prod') and get that file to local.
The code I used -
my $dir = "/home/code";
$f->cwd($dir) or die "Can't cwd to $dir\n";
$, = "\n";
my $fileto_get = "sample.sh";
$f->get($fileto_get) or die "Can't get $fileto_get from $dir\n";
This searches only in the specified directory 'code'. The file is present in 'tes't directory but it is not returned unless i change the directory to "/home/code/test".
Please guide me on how to fetch files, by mentioning only the parent directory.