I can't give you the snippet, but I can tell you the functions to use:

opendir (INDIR,"d:/");
my @items = readdir (INDIR);
closedir (INDIR);

foreach my $item (@items)
{
print "$item is a directory\n" if ((-d "d:/$item") and ($item !~ /\.|\.\./));
}


Take note that this reads in all elements, including subdirs and files and the '.' and '..', hence the checks.


Robert Maxwell wrote:

Here's a newbie question I guess. How would I build a list of all
files on a specified drive, recursively building the list? Suggestions or snippets would be appreciated.


Robert Maxwell

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to