سؤال

How do you find files inside directories with WMI Query Language?

This is what I have so far:

select * from Cim_DataFile
 where path = "\\\\C:\\Users\\name\\"

The query returns no results.

Any help is much appreciated.

هل كانت مفيدة؟

المحلول

You must remove the drive of the Path property and specify that value in the Drive property, so rewrote your WQL sentence to

SELECT * from Cim_DataFile where path = "\\Users\\name\\" and Drive="C:"

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top