Reader: 1
![]() |
|< 1 2 >| | ![]() |
17 entries, 2 pages |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# kopiere die Konfigurationsdaten ins Zielverzeichnis
my ($src, $dst) = map { noslashatend( dos2unix($_) ) } @_;
die "Not a directory" unless -d $src;
mkdir $dst;
if(opendir(my $dir, $src)) {
while(my $file = readdir $dir) {
next if $file =~ m!^\.\.?$!;
my $srcpath = "$src/$file";
my $dstpath = "$dst/$file";
if(-d $srcpath) {
copy_recursive("C:\\Beispieldaten\\Konfigurationsdaten", "C:\\Temp\\html");
} else {
File::Copy::copy( $srcpath, $dstpath );
}
}
closedir $dir;
}
sub noslashatend {
my $path = shift || '';
$path =~ s!/+$!;
return $path;
}
sub dos2unix {
my $path = shift || '';
$path =~ s!\\!/g!;
return $path;
}
$path =~ s!/+$!;
$path =~ s!/+$!!;
![]() |
|< 1 2 >| | ![]() |
17 entries, 2 pages |