Leser: 1
![]() |
|< 1 2 3 >| | ![]() |
26 Einträge, 3 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!D:/Programme/Perl
use strict;
use warnings;
use Net::FTP::Recursive;
print "Pfad (z.B. C:\\temp) : ";
my $path = <STDIN>;
chomp($path);
my $ftp = Net::FTP::Recursive->new("server", Debug => 0) or die "Konnte keine Verbindung aufbauen $!";
$ftp->login("user", "password") or die "Login failed: $!";
if(opendir(my $handle, $path)) {
while(my $file = readdir $handle)
{
next if $file =~ m#^\.\.?$#;
my $cmd;
$ftp->rput(\$path,$cmd,1,1);
}
closedir $handle;
}
$ftp->quit;
QuoteDer Befehl "ls" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Quoterput ( [ParseSub => \&yoursub] [,DirCommand => $cmd] [,FlattenTree => 1] [,RemoveLocalFiles => 1])
The recursive put method call. This will recursively send the local current working directory and its contents to the ftp object's current working directory.
This method will take an optional set of arguments to tell it what the local directory listing command will be. By default, this is "ls -al". If you change the behavior through this argument, you probably also need to provide a ParseSub, as described above.
![]() |
|< 1 2 3 >| | ![]() |
26 Einträge, 3 Seiten |