FileNotify2
bind file and action

Overview Screenshoots Settings Price Support Templates Advanced

 

Advanced FileNotify2 usage

For advanced usage you must have Microsoft .NET C# skill development.

With FileNotify2 you can create and use advanced script with Visual Studio or Visual Studio Express C# edition.

Create a new Class Library project. Add a Reference pointing to FileNotify2.dll.

Create a new class and inherit it from FileNotify2.IScript interface.

Override the method you need and write your code.

To test your Class Library and debug it create a new console project and add reference to both FileNotif2.dll and your Class Library.

Create a new rule with fnAdmin.exe. Open the generated XML file and find your rule GUID.

In the console main method add 3 lines

// Register your class with your Guid
FileNotify2.
Factory.GetInstance().AddInstance(new Guid("5694c8b7-f10f-4296-a8ee-yourguidvalue"), new MyScript());

// Create fnLib instance
FileNotify2.fnlib lib = new FileNotify2.fnlib();

// Start FileNotify
lib.Start();

 

When your Class Library is working, compile it and put it in the FileNotify2 directory. Name it yourguid.dll for example "5694c8b7-f10f-4296-a8ee-yourguidvalue.dll"

When FileNotify2 service starts it will try to load your Class Library. If it succeed your Class Library will be use instead of the corresponding script.