Greetings:
I am posting this in the hopes it helps others using the file.watch_create(), file.watch_destroy(), and file.watch_enumerate() functions.
Some observations:
1) This functionality is built (according to a Selwyn post way back when) on some underlying Windows functions. I am interpreting, by the way he worded it, that it does what it does, but some level of failure might be expected, and that it was probably outside Alpha Software's control. Again, my interpretation from what he posted.
There appear to be changes between Win XP, and Win7 and 8 that affect how it works.
If you are using this beyond a single file.watch, you may find that the file.watch_destroy() works in Win XP, but not in 7 and 8. (Alpha may stop "responding")
2) If selecting the 'F' argument, to detect a file being added, deleted, or name change, I think you will find your script will run up to three times... Once for each detected change. So, if you are deleting, then writing a file to the watched folder, your script may run twice. (There are other posts in this forum that hint upon this.
3) The 'T' Timestamp detection appears not to work, at least for me...
At any rate, this in concept, is a great function. Unfortuneatly, I lost quite a bit of time tracking down the points above, so use, but use with an awareness that there may be limitations.
Hope thsi helps another down the road...
I am posting this in the hopes it helps others using the file.watch_create(), file.watch_destroy(), and file.watch_enumerate() functions.
Some observations:
1) This functionality is built (according to a Selwyn post way back when) on some underlying Windows functions. I am interpreting, by the way he worded it, that it does what it does, but some level of failure might be expected, and that it was probably outside Alpha Software's control. Again, my interpretation from what he posted.
There appear to be changes between Win XP, and Win7 and 8 that affect how it works.
If you are using this beyond a single file.watch, you may find that the file.watch_destroy() works in Win XP, but not in 7 and 8. (Alpha may stop "responding")
2) If selecting the 'F' argument, to detect a file being added, deleted, or name change, I think you will find your script will run up to three times... Once for each detected change. So, if you are deleting, then writing a file to the watched folder, your script may run twice. (There are other posts in this forum that hint upon this.
3) The 'T' Timestamp detection appears not to work, at least for me...
At any rate, this in concept, is a great function. Unfortuneatly, I lost quite a bit of time tracking down the points above, so use, but use with an awareness that there may be limitations.
Hope thsi helps another down the road...