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