Leser: 4
6 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
my $dir = undef;
if(opendir($dir, $folder))
{
while(defined(my $file = readdir($dir)))
{
next if $file =~ /^\.\.?$/;
next if -f "$folder/$file";
print "$folder/$file";
}
closedir($dir);
}
1
2
3
4
5
6
7
8
9
my $root_path = 'absoluter Pfad zum Startverzeichnis';
my $start_dir = 'Startverzeichnis';
opendir THEDIR, "$root_path/$start_dir" or die $!;
readdir THEDIR for 0 .. 1;
@dirs = grep -d "$root_path/$start_dir/$_", readdir THEDIR;
closedir THEDIR;
print($_, "\n") foreach @dirs;
6 Einträge, 1 Seite |