Josimar Nunes de Oliveira <[EMAIL PROTECTED]> wrote:
:
: My O.S. is w2k and I put the argument 'C:\\' to run;
You don't have to use "C:\\". "C:/" is preferred.
: then a message is
: displayed:
:
: C:\Documents and Settings\Administrador\Desktop>perl filefind.pl
: Can't opendir(c:\/System Volume Information): Invalid argument
: at filefind.pl line 7
:
: Why and how to bypass this situation?
I'm using XP and don't have any trouble.
Though scanning my C: would take an hour or
so. What is "c:\/System Volume Information"?
Is it a directory, file, or something else?
Assuming line 7 is this, you may need a
more robust "wanted" subroutine.
find( sub{ push @files, [ $_, $File::Find::dir ] }, 'c://' );
For instance, @files contains everything that
Find::File may run into. It doesn't make a
distinction as to what it is being added.
This will only add files by testing with -f:
find( sub{ push @files, [ $_, $File::Find::dir ] if -f }, 'c://' );
: Other thing that seems to be basic in perl, but how
: to print the list obtained from File::Find, like a
: for/foreach/while?
That depends on what you are trying to do.
I know your making a list of files on your
drive, but Explorer can give a more informative
view than a text list. And it is faster than
this method. Tell us what you need and we can
help you sort it out (pun intended).
HTH,
Charles K. Clarkson
--
Head Bottle Washer,
Clarkson Energy Homes, Inc.
Mobile Home Specialists
254 968-8328
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]