Modern Word documents are just ZIP files, mostly containing XML files, both of which PowerShell can handle. This little script outputs the total editing time of a given Word document:
$zip = [System.IO.Compression.ZipFile]::Open($filename, 'Read') $propsentry = $zip.GetEntry('docProps/app.xml') If ($propsentry -ne $null) { $stream = $propsentry.Open() $reader = New-Object System.IO.StreamReader $stream $content = $reader.ReadToEnd() $xmldoc = [xml]$content $xmldoc.Properties.TotalTime } $zip.Dispose()
The time is measured in minutes.
Based on my Super User answer.
No comments:
Post a Comment