On Wednesday, June 22, 2016 at 9:29:02 AM UTC-4, rick h wrote:
> Am trying to access some file properties not supported with file attr or fileutils.
>
> For example, MS identifies a Description property.
>
> However that is not accessible via the aformentioned software.
If you're talking about versions of Office from the last decade, the .xlsx, .docx, .pptx files are all ZIP files containing XML documents.
Try something like:
# Require packages for ZIP files and XML documents
package require vfs::zip
package require tdom
# Open an Office document and read the core properties
set path c:/path/to/the/document.docx
vfs::zip::Mount $path $path
set f [open $path/docProps/core.xml r]; set data [read $f]; close $f
vfs::filesystem::unmount $path
# Parse the core properties, extract 'lastModifiedBy' and print it
set doc [dom parse $data]
set root [$doc documentElement]
foreach node [$root getElementsByTagName cp:lastModifiedBy] {
puts [$node text]
}