Thread Verzeichnisstrukturen älter als 30 Tage verschieben in ein Backup verschieben
(25 answers)
Opened by nastja at 2010-04-15 15:57
hier mal ein rekursives DIR
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 use strict; use warnings; use File::Spec; dir('.'); sub dir { my $p = shift; if(my $dir = opendir $p)) { while(my $f = readdir $dir)) { next if $f =~ /^\.?\./; my $path = File::Spec->catfile( $p, $f ); print "$path\n"; dir($path) if -d $path; } closedir $dir; } } |