Forum: Ruby win32::changenotify and multiple events

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ae16cb4f6d78e485b04ce1e821592ae5?d=identicon&s=25 Martin DeMello (Guest)
on 2007-02-28 13:09
(Received via mailing list)
Could someone give me a minimal example of win32::changenotify code
that will raise multiple events for, e.g. mkdir -p a/b/c or mv foo/bar
baz? The following only catches one event, for instance:

require "win32/changenotify"
include Win32

$stdout.sync = true

cn ="c:\\", true,
                      ChangeNotify::FILE_NAME |
                      ChangeNotify::DIR_NAME |

loop do
  cn.wait(5) {|ss|
    ss.each { |s|
      puts "File: " + s.file_name
      puts "Action: " + s.action

This topic is locked and can not be replied to.