Harmen Groenwold wrote:
>
> L.S.,
> I'm looking for a simple way to get all files in a directory and all it's
> subdirectories on Win32.
> For instance, the directory structure looks like this:
>
> c:\temp\
> file01.txt
> file02.txt
> c:\temp\subdir01
> subdirfile01.txt
> c:\temp\subdir01\subdir02\
> subdirfile02.txt
>
> Now, I want to get a list looking something like this:
>
> c:\temp\file01.txt
> c:\temp\file02.txt
> c:\temp\subdir01\subdirfile01.txt
> c:\temp\subdir01\subdir02\subdirfile02.txt
>
> How can I do this? I know I can get listings with glob, DIRHANDLE, etc, but
> I can't find anything which traverses all file in the underlying subdirs
> also.
> BTW, it has to work on Win32.
use File::Find;
find( sub { print "$File::Find::name\n" if -f }, 'c:/temp' );
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]