No announcement yet.

monitoring a file for changes (createchangenotify?)

  • Filter
  • Time
  • Show
Clear All
new posts

  • monitoring a file for changes (createchangenotify?)

    Does anybody have any examples of monitoring a single file for changes? From memory theres an API call called SomethingChangeNotify or thereabouts, Im sure somebody here has done it before but I couldnt find any links?


  • #2
    The APIs you are after are
    FindFirstChangeNotification and FindNextChangeNotification.
    Also, if you need a responsive GUI you will need

    There is a nice example of this in Advanced Windows by Jeffrey Richter
    in the chapter on file systems(FILECHNG.EXE).
    The new version of his book has a new name. I don't remember what it
    is at the moment.

    Dominic Mitchell
    Dominic Mitchell
    Phoenix Visual Designer


    • #3
      Also, in the source code forum I posted an 'Internet Cookie Monitor" program which uses the File Notify stuff. It includes the code you need to figure out which file in a folder has changed.

      This was 4-6 weeks ago if you use the search. (Just search on "cookie" it should turn up).

      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]


      • #4
        geez, i answered my own question in november 2000 but had completely forgotten about it, - "monitor a directory to detect filesize change"
        dave, i think i need to join you on that vacation ...
        thanks for pointing me to that cookie monitor though michael, very cute little utility