Leser: 2
7 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
my $path_files = "Structure/";
my $path_files_history = "Structure.Backup/";
# Verz. zum lesen oeffnen
opendir (BASE, $path_files) || die "Cannot read directory: ";
# Verzeichnis einlesen (checken ob datei)
my @dir = grep { $_ !~ /^..?$/ && -f "$path_files/$_" } readdir(BASE);
closedir (BASE);
# Alle eingelesenen Dateien durchgehen
foreach my $file (@dir) {
# Und kopieren
copy("$path_files/$file", "$path_files_backup/$file");
}
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl
use strict;
use warnings;
use File::NCopy;
my $path_files = 'Structure/';
my $path_files_history = 'Structure.Backup/';
my $file = File::NCopy->new(recursive => 1);
$file->copy($path_files,$path_files_history);
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/perl
use strict;
use File::Basename;
use File::Copy::Recursive qw(dircopy);
my $orig = "Structure/";
my $new = "Structure.Backup/";
dircopy($orig,$new);
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl
use strict;
use File::Basename;
use File::Copy::Recursive qw(dircopy);
my $orig = "Structure/";
my $new = "Structure.Backup/";
$File::Copy::Recursive::PFSCheck = 0;
dircopy($orig,$new);
7 Einträge, 1 Seite |