The problem is that Drive and ParentFolder are themselves objects,
with references to other objects, so you have to decide how many levels
you want to go down.. Here's an example of going one more level down,
but note you'll still get some hash messages in your output, because
the drive object references a folder object, and each folder object
references a drive, other folders, other files, etc.
use strict;
use warnings 'all';
use Win32;
use Win32::OLE;
use Win32::OLE::Variant;
my $fso = Win32::OLE->new( 'Scripting.FileSystemObject' );
Win32::OLE->Option( Warn => 0 );
my $file = $fso->GetFile("c:\\perl\\bin\\perl.exe");
foreach my $key (keys %$file) {
my $value = $file->{$key};
if (ref($value) eq 'Win32::OLE') {
foreach my $subkey (keys %$value) {
print "$key : $subkey : $value->{$subkey}\n";
}
}
else {
print "$key : $value\n";
}
}