OK, so melding together the discoveries and knowledge of these two hepcats - er, honorable monks - we might have something like this, maybe?
#!perl -w
use File::Find;
use Win32;
use strict;
find( \&wanted, "J:/ie5cache/Temporary Internet Files" );
sub wanted {
my $replacement = 'InfoTip="This is the IE cache folder"';
if ($_ eq 'desktop.ini') {
my $DOSname = Win32::GetShortPathName( "$File::Find::dir/$_" );
my $SRT = system( "ATTRIB -h -s -r $DOSname" );
warn "\nUh-oh, not going to work? -\n$!" if $SRT;
print( "Found $File::Find::dir/$_", qq[:\n]);
open( IEDF, "$File::Find::dir/$_") or die $!;
my @contents = <IEDF>;
close( IEDF ) or die $!;
if (@contents) {
for (@contents) {
s@UICLSID\=.+@$replacement\n@i;
}
open ( IEDF, ">$File::Find::dir/$_") or die $!;
print IEDF '',@contents,"\nreplacement made.\n";
print '',@contents;
close( IEDF ) or die $!;
}
}
}
There is only a little fruitfly in the ointment. The little line "InfoTip=This is the IE cache folder" does not seem to do anything in my Windows NT4 Explorer interface. Maybe this is (I think so) a Win98-specific innovation?
Good work anyway brothers, I like seeing my cache in ordinary perspective so I have some greater control over the contents.
Intrepid
|