Directory Watch
Last updated
Last updated
With the DirectoryWatch service, you can watch a directory for file changes, creations, renaming, and deletions.
You can add the logic you want to execute to the applicable service .
You can set the buffer to 4 KB or larger, but it must not exceed 64 KB. If you try to set the buffer size property to less than 4096 bytes, your value is discarded and the buffer size property is set to 4096 bytes. For best performance, use a multiple of 4 KB on Intel-based computers.
Add a file mask to filter specific file types (e.g. *.txt
).
If no value is specified, all files (*.*
) will be watched.
A flag to indicate whether the service should process files in sub-folders of the specified path.
The types of changes to watch for. These options are only applicable when the "Watch for changes" property is true.
Attributes: Occurs when a file or directory has been saved with changed attributes.
Creation Time: Occurs when a file or directory is created.
Directory Name: Occurs when a directory name has changed.
File Name: Occurs when a filename has changed.
Last Access: Occurs when a file is accessed.
Last Write: Occurs when a file is overwritten or data is appended, as well as when a folder is written to.
Security: Occurs when the security settings of a file or directory change.
Size: Occurs when a file's size changes.
The path of the directory to be watched.
Activated by the "Watch for changes" property. Raised when a file or directory has changed in the watched directory. Use the "Notify filter" property to specify the relevant changes to watch for.
Activated by the "Watch for creation" property. Raised when a file or directory has been created in the watched directory.
Activated by the "Watch for deletions" property. Raised when a file or directory has been deleted in the watched directory.
Activated by the "Watch for renaming" property. Raised when a file or directory has been renamed in the watched directory.
Raised when an error has occurred in the watched directory.
Activates the .
Activates the .
Activates the .
Activates the .