perlvroom has asked for the wisdom of the Perl Monks concerning the following question:
The above script will copy the contents of a directory on one ftp server and move it to another. Is there any way i can make it to where it will only copy the directory tree and ignore any files in any of the folders?my $directory='C:/Temp'; mkdir($directory); chdir($directory); my $ftp = Net::FTP::Recursive->new("$ftp1", Debug => 0); $ftp->login("$login",'$password'); $ftp->cwd('/'); $ftp->rget(); $ftp->quit; my $ftp2 = Net::FTP::Recursive->new("$ftp2", Debug => 0); $ftp2->login("$login",''); $ftp2->cwd('/'); $ftp2->rput(); $ftp2->quit; chdir("C:/"); remove_tree($directory);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: copying FTP directories from one server to another
by hippo (Archbishop) on Jun 08, 2013 at 09:45 UTC |