I have a WMI Event watcher Task that watches for the creation of a file in a folder. When I run the package, I get no errors but the WMI task keeps running and never finds the file. I am watching a folder on a shared drive. My WQL query is as follows:
SELECT * FROM __InstanceCreationEvent WITHIN 5
WHERE TargetInstance ISA 'CIM_DataFile'
AND TargetInstance.Drive = '\\\\AB-498\\New-Data' AND TargetInstance.Path = '\\Data-Downloads\\'
AND TargetInstance.FileName LIKE 'Some_Name%'
I have also tried changing TargetInstance.Drive
to the local drive name "Y:"
but got the same result. Do you see anything wrong with my method?