in reply to Re^6: Directory Tree Structure
in thread Directory Tree Structure

Sorry... I changed the "user interface" on the script without telling you. The version you originally posted had a specific path hard-coded for "$rootdir", but in order for me to try it out myself (without a windows system or the specific directory path you used), I made it so that the "$rootdir" comes from a command-line argument (given to the script via @ARGV).

So my version requires exactly one command-line arg (@ARGV==1) and this arg must represent a reachable directory path (-d $ARGV[0]), or else the script dies and tells you what it needs in order to run (Usage: {name_of_script} path_name). That's just a typical unix-style CLI.

To go back to your own hard-coded value for $rootdir, just comment out that @ARGV line and the one after it, then add in your single line that assigns a specific path string to $rootdir.