Windows下通過命令行 獲取文件詳細信息



@echo off echo version: wmic datafile
where Name="C:\\Product\\File\\Release\\1.1.1\\File.exe" get Manufacturer,Name,Version pause

 

運行結果:

 

 上面的例子是通過 WMIC 獲取文件版本號

通過 WMIC.exe 獲取文件信息

https://docs.microsoft.com/zh-cn/windows/desktop/WmiSdk/wmic

通過 WMIC 可以獲取的所有文件信息如下:

Access Rights
Caption
Class Name
Compressed
Compression Method
Computer System Class Name
Computer System Name
Creation Date
Current File Open Count
Description
Drive 
Eight Dot Three File Name 
Encrypted 
Encryption Method
File Extension 
File Name 
File System Class Name 
File System Name 
File Type 
Hidden 
Install Date 
Last Accessed 
Last Modified 
Manufacturer 
Name 
Path 
Readable
Should Be Archived 
Size 
Status 
System File 
Version 
Writeable

 

wmic datafile where name='c:\\windows\\system32\\notepad.exe' > out.txt

 

 

 

 

http://winplat.net/2009/09/24/how-to-check-file-properties-through-wmi-command-line/

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM