Saw the example script in another thread, but I can't seem to get it to
work. It runs but returns nothing.
Dim objWMIService
Dim colFiles
strComputer = "mycomputer"
Set objWMIService = GetObject("winmgmts:" &
"{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery("Select * from CIM_Datafile Where
filename ='mail.txt'")
For each obj in colFiles
wscript.echo obj.name 'Returns the full file and path.
Next