Re: How to build a list of files on a drive... Additional question

2005-05-02 Thread $Bill Luebkert
day, April 18, 2005 5:26 AM > To: Robert Maxwell > Cc: ActivePerl@listserv.activestate.com > Subject: Re: How to build a list of files on a drive... > > Robert Maxwell wrote: > > >>Here's a newbie question I guess. How would I build a list of all >>files on

RE: How to build a list of files on a drive... Additional questio n

2005-05-02 Thread Bowie Bailey
From: John Maliniak [mailto:[EMAIL PROTECTED] > > From: [EMAIL PROTECTED] > > > > use strict; > > use File::Find; > > > > my $dir = shift || "C:/"; > > print "$dir: \n"; > > find (\&wanted, $dir); > > > > sub wanted { > > > > return if /^\.{1,2}$/; > > print "$File::Find::name: \n" if -d; > >

RE: How to build a list of files on a drive... Additional question

2005-05-02 Thread John Maliniak
@listserv.activestate.com Subject: Re: How to build a list of files on a drive... Robert Maxwell wrote: > Here's a newbie question I guess. How would I build a list of all > files on a specified drive, recursively building the list? > Suggestions or snippets would be appreciated. Simp

Re: How to build a list of files on a drive...

2005-04-18 Thread David Nicol
> Here's a newbie question I guess. How would I build a list of all > files on a specified drive, recursively building the list? > Suggestions or snippets would be appreciated. > > Robert Maxwell $drive = 'c'; open MYFILELIST, "dir $drive: /s/b |" or die "could not spawn d

RE: How to build a list of files on a drive...

2005-04-18 Thread David Nickel
Look at the File::Find module. It will make your life a lot easier. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Maxwell Sent: Monday, April 18, 2005 2:40 AM To: ActivePerl@listserv.ActiveState.com Subject: How to build a list of files on a

Re: How to build a list of files on a drive...

2005-04-18 Thread $Bill Luebkert
Robert Maxwell wrote: > Here's a newbie question I guess. How would I build a list of all > files on a specified drive, recursively building the list? > Suggestions or snippets would be appreciated. Simplest way would be to use File::Find and test for dir in the wanted sub so you could treat th

Re: How to build a list of files on a drive...

2005-04-18 Thread Foo Ji-Haw
I can't give you the snippet, but I can tell you the functions to use: opendir (INDIR,"d:/"); my @items = readdir (INDIR); closedir (INDIR); foreach my $item (@items) { print "$item is a directory\n" if ((-d "d:/$item") and ($item !~ /\.|\.\./)); } Take note that this reads in all elements, in

How to build a list of files on a drive...

2005-04-17 Thread Robert Maxwell
Here's a newbie question I guess. How would I build a list of all files on a specified drive, recursively building the list? Suggestions or snippets would be appreciated. Robert Maxwell ___ ActivePerl mailing list ActivePerl@listserv.ActiveState.com T