1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Rep Power

    Directory watcher false event throw


    I am having a problem with directory watcher, environment is :

    Windows 2003

    Coldfusion 8.0.1

    Current scenario :

    My directory watcher is watching a shared folder (A) on network, and copies files from that folder to a different share folder (B) on network (Both shared folder are in different boxes)

    Problem :

    Sometime my onAdd fires at odd times and it starts copying all the files available on A folder to B. And when I check logs, that time no files were added in A folder.

    Problem is onAdd event fires any time and I dont know why its happening.

    Please Help.

    Some more info:

    I am not moving files from A to B, just copying, so old files remains in same folder, there are around 3000-4000 files as of now in A folder, and every day 10-12 files gets copy in A.
  2. #2
  3. No Profile Picture

    Join Date
    Jun 2002
    Raleigh, NC
    Rep Power
    I would add some logging to the onAdd method to determine what file is being added:

    <cfset data=CFEvent.data>
    <cflog file="MydirWatcher" application="No"
    text="ACTION: #data.type#;FILE: #data.filename#;
    TIME: #timeFormat(data.lastmodified)#">

    It's also possible that there are issues with this under CF 8 that have been fixed in CF 9. CF 8 is four years old.

IMN logo majestic logo threadwatch logo seochat tools logo