Put FileNotify.exe where you want, for
example in the WINNT directory.
Type in "FileNotify.exe -install" and this is it, installation
To remove FileNotify type in "FileNotify.exe -remove".
This program does not require special DLL.
If you do an upgrade from a previous
version, stop the service, close Event Viewer, replace FileNotify.exe with
the new version and start the service.
We chose this minimalist installation
scheme because we are sure you don't like to start heavy blind
installation program on your production park. You certainly have in
mind "I hope it will not upgrade a DLL that is incompatible with
existing programs !"
FileNotify is a
Windows NT 4.0/3.51/2000 service that works on Server and
For NT 3.51 you must have SP5.
Service long name is
"File Notification". Start it in the service manager program.
Service short name is filenotify, use it with net start and stop command.
net start filenotify
net stop filenotify
parameters are in FileNotify.txt file, located in the same directory as
Some advanced parameters are in the registry key HKEY_LOCAL_MACHINE\Software\XTWare\FileNotify
FileNotify.txt is parse during the service start. If you edit the file,
you need to stop/start the service.
To edit FileNotify.txt you can use your
usual text editor, or you can use FNAdmin.exe
When starting, FNAdmin ask for the file to open for editing. If this is
the first time you start it, chose cancel.
Add, Edit or Delete entry.
When finished, press OK. If you just created the file give a name to save
We chose text file for parameters because we find this is more
convenient than registry for remote computer admin. You can also easily
spread the file on your park. The txt extension take advantage of default
Each line in this file use the following grammar:
1 for File, 2 for Directory, 3 for both.
The flag tell witch event to look at. 1 = Creation 2 = Deletion 4 = Rename 8 = Modification 16 = Attributes change (read-only, archive, hidden, system) 32 = Security change
64 = Rename with long name support (see below )
0 mean no recursive directory check.
1 mean recursive directory notification.
This figure tell how many you can start
simultaneously. if if less or equal to 0 then it is replaced by 1. For example if value is two, this mean you can
have two running simultaneously, no more. If new file are
added to when two instances of are
already running, FileNotify wait for one of the two to stop
and then start a new one.
Put a fully qualified local directory
For example c:\temp, or c:\inetpub\ftproot\advanced users\sql
Don't use double quote for path with space in.
You can specify UNC path (remote directory
and syntax like \\server\share\dir1\dir2) and it should work, but
not guaranteed. With UNC path
FileNotify service must be started under administrator account as local
system account can't do networking. UNC path have not be tested on all
version of Windows. If it doesn't work with the version you work with try
to apply last service pack. Behavior not determined on no Windows server
(Samba, disk array...). Tell me if you test such no Windows server.
You can't use local mapped drives as services can't see these objects.
The full path to the program or batch. You can use %s to get full path to
the new file. One exception is for rename event, %s will contain the new name and
the old name in that order, for example "c:\ftproot\newfile.txt c:\ftproot\oldfile.txt"
The rename2 event will use double quote separator for long name support
"c:\space directory\old file name.txt" "c:\space
directory\new file name.txt"
Put comments by starting a line with a semicolon (;)
The registry path is HKEY_LOCAL_MACHINE\Software\XTWare\FileNotify
LogFile value specify the
file to log to. If you need daily file add %s in name, this will be
replaced by the date in yyyymmdd format. Default installation value is
Remove (or rename) this key to disable log.
specify if action failure should be trace to event log. Default value is
Remember that failure are also written
to NT's EventLog (see EventLogFailure registry key)
If you need to access file on network
neighborhood you must set FileNotify service to log on a Windows NT
account that have this right. System account can't do network
Take care of recursivity. If the action
writes in the directory is associated with you will have race
If you have problems troubleshooting
abnormal execution use the -debug option. With this option all text
printed to stdout will appear as well as all interactive program window's.
(FileNotify -help for more info)
The trigger for FileNotify to start an
action is the last write-time change. Some programs change this value
twice when writing a file, that's why FileNotify waits 1 second of
"inactivity" on the new file before performing the action.
FileNotify can't monitor single file
activity. You can do this easily using a batch file filter. For
exemple you start "go.bat %1" and in go.bat you put a line
like "if "%1"=="myfile.ext" goto action"