Re: Unique Dir Listing

2004-04-13 Thread Ben Crane
Japhy, Thank you! But now I have another problem as a result: #!/perl/bin -w use strict; use File::Find; open (DEST, ">c:/temp/dirlist.txt") || die "opening log file: $!"; sub getlist { print DEST "$File::Find::name\n" if -d; print "$File::Find::name\n" if -d; } find \&getlist, 's:/';

Re: Unique Dir Listing

2004-04-08 Thread Jeff 'japhy' Pinyan
On Apr 8, Ben Crane said: >I need to get a unique list of directories/sub-dirs, >etc for certain drives...the problem is, when I run >the following code, I get loads and loads of >duplicates, which isn't what I want. The reason is because you're not printing the entries you find when they happen

Unique Dir Listing

2004-04-08 Thread Ben Crane
Hi all, I need to get a unique list of directories/sub-dirs, etc for certain drives...the problem is, when I run the following code, I get loads and loads of duplicates, which isn't what I want. Can anyone tell me what is wrong with my code? It works fine with files. #!/perl/bin -w use strict;

Unique DIR listing

2004-04-08 Thread Ben Crane
Hi all, I'm trying to get a unique list of all directories on certain drives in windows. Problem is, with my script, I get tons and tons of duplicates...can anyone point out what I'm doing wrong? #!/perl/bin -w use strict; use File::Find; open (DEST, ">c:/temp/p_drive.txt") || die "opening log f