--------8<------------
        > got some code:
        > 
        > #! -*- perl -*-
        > opendir(DH,'C:\install\_import\Temporary Internet Files') &&
(@d = readdir(DH))
        >     && closedir(DH) && print join("\n",@d);
        > 
        > get this output:
        > 
        > C:\>pl.pl
        > .
        > ..
        > Content.IE5
        > desktop.ini
        > C:\>
        > 
        > I'm pointless why... there is more than 35 000 files.
        
         
        35000 files, but how many directories???   remember that
opendir(), readdir(), etc., only access directories, not files.   
 --------8<------------

Bill, whats your point? This:-

<CODE 1>
use strict;
use warnings;

my $Dir = "C:/Documents and Settings/$ENV{USERNAME}/Local
Settings/Temporary Internet Files";

chdir $Dir or die "Can't cd to $Dir:- $!";

foreach my $Item(<*>)
{
        print "$Item\n";
}
</CODE 1>

And this:-
<CODE 2>
use strict;
use warnings;

my $Dir = "C:/Documents and Settings/$ENV{USERNAME}/Local
Settings/Temporary Internet Files";

opendir(DH, $Dir) or die "Cant opendir $Dir:- $!";
my @Files = readdir DH;
closedir DH;

print join "\n", @Files;
</CODE 2>

Produce exactly the same output bar the special dirs '.' and '..'

The thing here is that the OP is accessing his/her cache, and files in
the cache have limited functionality (try selecting one and right
clicking it). Exposing these files and printing them out as the OP
suggests will require a workaround such as  copying all files in the
cache and dumping them to another folder like C:/Temp.

Just in

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to