Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 WMI 查询语言在目录中查找文件?
这是我到目前为止所拥有的:
select * from Cim_DataFile where path = "\\\\C:\\Users\\name\\"
查询不返回任何结果。
任何帮助深表感谢。
您必须删除属性的驱动器并在Path属性中指定该值Drive,因此将您的 WQL 语句重写为
Path
Drive
SELECT * from Cim_DataFile where path = "\\Users\\name\\" and Drive="C:"