Check out win32\test\test_win32file - it has a test for that function, including some comments about using it with threads.
The short version is that you don't sleep - just call ReadDirectoryChangesW - it will return when a change happens. > The result is that the api works good only if the changes in > in top-level and second-level, else I got a () only. > > I search for msdn and found that there is a parameter 'BOOL > bWatchSubtree' in the original api, where is it in pywin32? Check out the help file installed with pywin32 - it documents that as the 3rd param. > What can I do now ? Maybe only I can do is to create a > watcher thread for each directory in d:\\ I've successfully used this function to watch a sub-tree in the past, although not from the root. I'd expect that to be expensive! Mark
_______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32