> -----Original Message-----
> From: Anthony Saffer [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 17, 2002 11:03 AM
> To: [EMAIL PROTECTED]
> Subject: Recognizing Directories...
> 
> 
> Hello Everyone,
> 
> I am writing a utility that needs to index the files 
> contained within about 500 directories (some nested). I want 
> to provide the script with a top directory and have it 
> recurse through everything underneath while indexing the 
> files within each. I've searched Google and can't seem to 
> find a way to do this. I know how to get all files within a 
> directory but how do I RECOGNIZE my directories so I can 
> descend into them to index?

You can test whether a filename is a directory with -d

   perldoc -f -d

But you should use the standard File::Find module to traverse directory
trees. It comes with the standard Perl distribution, so you've got it.

   perldoc File::Find

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

Reply via email to