Directory Monitor is a windows service which tracks folder changes, such as file creation, removal, modification or rename.
Multiple locations can be monitored
Network shares can be monitored using UNC path
Automatically performs user-defined tasks and actions.
Installing Directory Monitor
Directory Monitor is automatically installed during setup but not configured.
It can be also installed using the command line
To install the Directory Monitor as a service run following command:
If the Monitor is already installed you it must be uninstalled first
To uninstall the Monitor as a Windows service you must run the Monitor with the /UNINSTALL switch as follows
The commands above must be executed as administrator (elevated).
Configuring Directory Monitor service
It is recommended to run Directory Monitor using the same user used to design packages/transformations/sql scripts.
Checking Monitor Status
Make sure that monitor service is up and running
Make sure that monitor service is using the appropriate username and user
Make sure that user has access to directories monitored
Make sure that monitor is enabled on the maintenance tab
Make sure that directory is enabled on Event monitors tab
Make sure that execution agent is configured properly
Monitor is enabled on Maintenance tab
Monitor is enabled on Event Monitors tab
Action was submitted by Directory Monitor
Directory Monitor Variables
<Directory Monitor File Name>
Things to Consider
Directory Monitor is only available with Enterprise Version.
Do not use mapped drives, use UNC path instead.
“Wait until the file is ready” only works for file creation.
What if you have 1000+ files copied into the directory? Directory monitor will fire a trigger for every single file
The solution to this problem is to use a trigger file.
Eg you copy 1000+ files into the directory and copy the last file called trigger.txt.
Set monitor mask to trigger.txt.
Monitor fires only once.
Package moves files into the different directory (with a timestamp) and processes the files one by one.