[Win32utils-devel] win32-dirmonitor and subdirectories

Heesob Park phasis at gmail.com
Mon Feb 10 15:18:08 UTC 2014


2014-02-10 22:45 GMT+09:00 Daniel Berger <djberg96 at gmail.com>:
> Hi all,
> Is there a simple way to include changes to subdirectories while monitoring
> __instanceOperationEvent's? Or will I simply have to find all subdirectories
> first and attach an event to each one?
In theory, you can use LIKE operator like this:
      query = %Q{
        select * from __instanceOperationEvent
        within 2
        where targetInstance isa 'CIM_DataFile'
        and targetInstance.Drive='#{drive}'
        and targetInstance.Path like '#{folder}%'
But, the LIKE operator requires a lot of system resources and time.
Refer to http://stackoverflow.com/questions/13040835/why-does-wql-like-operator-not-work-on-drive-c-but-works-fine-on-drive-d

Park Heesob

More information about the win32utils-devel mailing list