Use module File::Find along with -d filename ( if true then directory ) I 
believe the doc accompanying File::Find should be sufficient to get you started, but 
if problems, come back to the list.

Wags ;)

-----Original Message-----
From: Joe Collins [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 09, 2002 08:58
To: [EMAIL PROTECTED]
Subject: windows - how do I detect file vs directory and then traverse


Hi,

My goal is to find all the directories on my computer and sort them
by size order as my PC harddrive is rapidly filling up and I am sure I have
some junk on it taking up boatloads of space.

I know I have  to use stat() to get the file size (after I open it). My 
questions are:

1-Has anybody done this, i.e. written a perl program to study harddrive
   and find largest files/largest directories?
2-How do I tell if an item is a file or a directory via stat or something else?

Thanks,

Joe


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

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

Reply via email to