Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CIM_DataFile and search specific drive

Status
Not open for further replies.

lupidus

MIS
Jun 1, 2003
30
US
I'm trying to use CIM_DataFile to search only the C drive for PST files. However, the code is running through all drives (plus network/mapped drives).

Code:
	Set objWMIService = GetObject _
		("winmgmts:\\" & strComputer & "\root\cimv2")
		
	Set colFiles = objWMIService.ExecQuery _
		("Select * From CIM_DataFile Where extension = 'PST' AND Drive='c:'")
	
	For Each objFile in colFiles
' do stuff here..		
	Next

describes how to use the Drive property and it doesn't look like I'm doing anything wrong.

Anyone have any suggestions?
 
It shouldn't be and wouldn't be. Can you confirm and show evident?
- tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top