可以使用dsofile.dll(如果已安装Office则不需要)和autoit或任何.NET语言的组合拉动您要查找的内容。
我还找到了一个powershell方法,但是我无法对其进行测试。
我用autoit编写了一个小脚本,仍然需要进行一些调整。我在Vista上,无法像我期望的那样获得几个dsofile.dll调用,尽管它仍然提供了一些您可能感兴趣的输出。我将在早上可以访问时进行更多工作到XP和win7 VM。请注意,您需要将dll函数中的路径更改为安装dsofile.dll的位置。
#include <file.au3>
Dim $file, $objFile, $Path, $encoding, $attrib, $attributes, $dt, $stamp, $szDrive, $szDir, $szFName, $szExt
If $CmdLine[0] = 0 Then
ConsoleWrite("You must specify a file")
Else
$file = $CmdLine[1]
If FileExists($file) Then
_DLLstartup()
$objFile = ObjCreate("DSOFile.OleDocumentProperties")
If Not IsObj($objFile) Then Exit
$objFile.Open(FileGetLongName($file))
$Path = _PathSplit($file, $szDrive, $szDir, $szFName, $szExt)
ConsoleWrite("Filename: " & $Path[3] & $Path[4] & @CRLF)
ConsoleWrite("Size: " & FileGetSize($file) & " bytes" & @CRLF)
ConsoleWrite("Version: " & FileGetVersion($file) & @CRLF)
ConsoleWrite("Company: " & $objFile.SummaryProperties.Company & @CRLF)
ConsoleWrite("Author: " & $objFile.SummaryProperties.Author & @CRLF)
$encoding = FileGetEncoding($file)
Select
Case $encoding = 0
$encoding = "ANSI"
Case $encoding = 32
$encoding = "UTF16 Little Endian"
Case $encoding = 64
$encoding = "UTF16 Big Endian"
Case $encoding = 128
$encoding = "UTF8 (with BOM)"
Case $encoding = 256
$encoding = "UTF8 (without BOM)"
EndSelect
ConsoleWrite("Encoding: " & $encoding & @CRLF)
$attrib = FileGetAttrib($file)
$attributes = ""
If StringInStr($attrib, "R") <> 0 Then
$attributes = $attributes & " READONLY"
EndIf
If StringInStr($attrib, "A") <> 0 Then
$attributes = $attributes & " ARCHIVE"
EndIf
If StringInStr($attrib, "S") <> 0 Then
$attributes = $attributes & " SYSTEM"
EndIf
If StringInStr($attrib, "H") <> 0 Then
$attributes = $attributes & " HIDDEN"
EndIf
If StringInStr($attrib, "N") <> 0 Then
$attributes = $attributes & " NORMAL"
EndIf
If StringInStr($attrib, "D") <> 0 Then
$attributes = $attributes & " DIRECTORY"
EndIf
If StringInStr($attrib, "O") <> 0 Then
$attributes = $attributes & " OFFLINE"
EndIf
If StringInStr($attrib, "C") <> 0 Then
$attributes = $attributes & " COMPRESSED"
EndIf
If StringInStr($attrib, "T") <> 0 Then
$attributes = $attributes & " TEMPORARY"
EndIf
ConsoleWrite("Attributes:" & $attributes & @CRLF)
$dt = FileGetTime($file, 1)
$stamp = $dt[0] & "-" & $dt[1] & "-" & $dt[2] & " " & $dt[3] & ":" & $dt[4] & ":" & $dt[5]
ConsoleWrite("Created: " & $stamp & @CRLF)
$dt = FileGetTime($file, 0)
$stamp = $dt[0] & "-" & $dt[1] & "-" & $dt[2] & " " & $dt[3] & ":" & $dt[4] & ":" & $dt[5]
ConsoleWrite("Accessed: " & $stamp & @CRLF)
$dt = FileGetTime($file, 2)
$stamp = $dt[0] & "-" & $dt[1] & "-" & $dt[2] & " " & $dt[3] & ":" & $dt[4] & ":" & $dt[5]
ConsoleWrite("Modified: " & $stamp & @CRLF)
ConsoleWrite("Short Name: " & FileGetShortName($file, 1) & @CRLF)
ConsoleWrite("Long Name: " & FileGetLongName($file, 1))
$objFile.Close
_DLLshutdown()
Else
ConsoleWrite("Can't find file")
EndIf
EndIf
Func _DLLstartup($DLLpath = '') ;borrowed from Andrew Goulart
If $DLLpath = Default Or $DLLpath = '' Then $DLLpath = "C:\DsoFile\dsofile.dll";@ScriptDir & '\dsofile.dll'
ShellExecuteWait('regsvr32', '/s /i ' & $DLLpath, @WindowsDir, 'open', @SW_HIDE)
EndFunc
Func _DLLshutdown($DLLpath = '') ;borrowed from Andrew Goulart
If $DLLpath = Default Or $DLLpath = '' Then $DLLpath = "C:\DsoFile\dsofile.dll";@ScriptDir & '\dsofile.dll'
ShellExecuteWait('regsvr32', ' /s /u ' & $DLLpath, @WindowsDir, 'open', @SW_HIDE)
EndFunc
FILEVER
从Windows CD 安装。