Here's a fairly simple little script to list directories and files recursively.
Couple questions:

-- Is it fairly simple to make it list everything in a properly indented
heirarchy?  (Somewhat similar to what windows explorer would look like if every
level were expanded).
-- In the sub, how can we know how many levels deep, to be able to add that
many tabs?
-- It would be useful to make it adhere to alphabetical order.  Right now,
maybe it is driven by creation date or something, not sure.

(If you're real new and want to try it, it will run as is, with only one likely
change necessary, to $toplevel).

#!/usr/local/bin/perl

use File::Find;

$toplevel = "D:\\PERL";
$wildcardtab = ""; # to be able to build these up, \t, \t\t, etc

find(\&List, $toplevel);

sub List {
        #$wildcardtab .= "\t" if some_condition;
        print "\n\n$wildcardtab$_ <DIR>\n" if -d;
        print "\t$wildcardtab$_\n"         if -f;
}

Gary



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to