This is an old revision of the document!
#!/usr/bin/perl # this script is written by ketan patel use Net::FTP; $file = "name of file"; @paths = ('comma_separated path file'); $remotehost = "<remote_hostname>"; $user = "<ftp_username>"; $pass = "<ftp_password>"; chdir "/www/virtual/hugh797/passync"; $k2=1; print "Connecting...\n"; $ftp = Net::FTP->new("$remotehost", Debug => 0) or die "cannot connect:"; print "Logging in...\n"; $ftp->login("$user","$pass") or die "cannot login: ",$ftp->message; print "Beginning Transfer...\n"; foreach $paths (@paths) { print "$paths/$file..\n"; $ftp -> cwd($paths); print "xfering $file..\n"; $ftp->get($file,"$file$k2"); $ftp->message; $k2++; } print "Done.\n";