Apa yang Anda cari dapat ditarik dengan kombinasi dsofile.dll (tidak diperlukan jika Anda memiliki Office diinstal) dan autoit atau bahasa .NET.
Saya juga menemukan metode PowerShell , tetapi saya belum bisa mengujinya.
Saya menulis skrip kecil dengan autoit yang masih membutuhkan beberapa penyesuaian. Saya menggunakan Vista dan saya tidak bisa mendapatkan beberapa panggilan dsofile.dll berfungsi seperti yang saya harapkan, meskipun masih memberikan beberapa output yang Anda mungkin tertarik. Saya akan mengerjakan ini lebih banyak di pagi hari ketika saya memiliki akses ke XP dan win7 VM. Perhatikan bahwa Anda perlu mengubah jalur di fungsi dll ke mana pun Anda menginstal 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
dari CD Windows.