I've used the DSOFILE component from Microsoft in the past to access Office document properties:
http://support.microsoft.com/kb/224351 You'll have to try it yourself to see if it still works under Windows 7 or not. Cheers, -Jan From: [email protected] [mailto:[email protected]] On Behalf Of Tim Moor Sent: Friday, October 30, 2009 4:24 PM To: [email protected] Subject: Accessing Extended File Attributes - Word Document Hi there, I have around 50,000 or so word documents and I would like to write a script to sort these files by author. The author is held as a extended file attribute and so far I have not been able to find a way to access this data. I have tried using the following Win32::OLE script to extract these values. However under Windows 7 this does not return the correct information. I am unsure wither this is because Windows 7 has changed the file attribute structure, or because this method does not allow me access to this data. my $directory = $ARGV[0] || die "$pname requires directory as first ar +gument\n"; find(\&main2, $directory); sub main2{ if(-f $File::Find::name){ if(extention($File::Find::name) eq '.pdf'){ #print "File: $_ Extention: " . extention($_) . "\n"; my $shell = Win32::OLE->new("Shell.Application") or die; my $folder = $shell->NameSpace("$File::Find::dir") or die; my $file = $folder->ParseName("$_") or die; for my $i (0..50){ my $attrib = $folder->GetDetailsOf($file, $i); print "$i) $_ >> $attrib\n" if ! $attrib eq ''; } print "-------------------------------------------\n"; } } } <http://www.perlmonks.org/index.pl?abspart=1;displaytype=displaycode;node_id=804237;part=1> [download] I want to be able to access this value on pdf, doc & excel files types so if you could point me in the direction of a module or thread on how I can achieve this I would be forever grateful. Thanks and looking forward to your response. Tim -- Thanks, Tim
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
