|FileNotify Case Study||
This is a small case study to send an e-mail
when a new file is received. The e-mail will contain the file name.
To send the e-mail we will use Blat. Get it and install it in c:\utils directory.
c:>blat -install mailserver.yourdomain.com firstname.lastname@example.org
Install FileNotify, set environnement and configuration
In this case we will install FileNotify and Blat in c:\utils directory and we will monitor c:\ftproot directory structure.
Make the two directories, copy FileNotify.exe in c:\utils and make FileNotify.txt with the following content.
; FileNotify sample
This sample watch c:\ftproot directory, recursively, one action at a time, and the action start sendmail.bat
Install Filenotify with the command c:\utils\FileNotify -install
Start FileNotify "net start filenotify".
Now let see what's in sendmail.bat
echo The new file is %1 > c:\utils\msg.txt
c:\utils\blat c:\utils\msg.txt -s "New file in c:\ftproot" -t email@example.com
Customize this file with your parameters.
Let's test FileNotify
Ok, you are ready to test it.
For example open NotePad, type in some text, and save this new file in c:\ftproot\test.txt. You receive an e-mail with the name of the new file.
Need some help ? Contact firstname.lastname@example.org