in reply to Re: need help with FTP script
in thread need help with FTP script
but I get following error:...................................................................... +. # ftp transfer my $ftp = Net::FTP->new ($server, Timeout => 9000, Debug => 3) +; $ftp or die "$server: cannot connect: $@"; # If you don't use ~/.netrc $ftp->login ($user,$password) or die "$_: cannot logon: " . $ftp->message; # change remote directory for the first file $ftp->cwd($destination); # Send file to ftp server $ftp->put($new) or die "$server: cannot put $new: " . $ftp->message; #Quit FTP When finished $ftp->quit; # Sleep for 20 minutes before processing next file. sleep (20 * 60) $ftp = Net::FTP->new ($server, Timeout => 9000, Debug => 3); # + (this is 172 line) $ftp or die "$server: cannot connect: $@"; # If you don't use ~/.netrc $ftp->login ($user,$password) or die "$_: cannot logon: " . $ftp->message; # change remote directory for the first file $ftp->cwd($destination); # # this is new my $found = grep /\Q$new\E/, $ftp->ls; if ($found) { die "The file is still there!\n" } ...................................................................... +... # ftp transfer
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: need help with FTP script
by Roy Johnson (Monsignor) on Jun 11, 2004 at 15:00 UTC | |
by cc (Beadle) on Jun 12, 2004 at 09:34 UTC | |
by cc (Beadle) on Jun 15, 2004 at 21:58 UTC | |
by Roy Johnson (Monsignor) on Jun 15, 2004 at 22:06 UTC | |
by cc (Beadle) on Jun 15, 2004 at 23:21 UTC | |
by cc (Beadle) on Jun 16, 2004 at 16:03 UTC |