This custom trigger function is used to compare the files on content
See How to Create Custom Trigger Functions for details on installation.
Downloads
Source code and build instructions
How to Compare Files using FileContentCompare Function
Let me now show you how to implement that.
1. Make sure you have FileContentCompare function installed
Before creating a custom trigger to use the function FileContentCompare, you need to
have build installed in the server where JSCAPE MFT Server is running.
2. Create a Trigger to compare content on File Upload
Now login into admin console of JSCAPE MFT Server > Triggers and Click Add to create a Trigger
Give the trigger a Name and then select the File Upload event type from the drop-down list.
Click Next to Step 2 to set the condition to check the uploaded file content to already existing file.
Use the below condition;
Click Functions button to select the FileContentCompare(file1,file2) function.
If the function not listed you need to have build installed in the server.
FileContentCompare(LocalPath,"<file-path-to-check>")=true
Below screen shows that an uploaded file content is compared with already existing file
Click Next to proceed. On TRUE move the files.
On Step 3 an action has to be added, in order to add an action click Add button and select the action "Move File" from drop down list and Click OK
On OK there would be two parameters for Move File Action;
- File (Uploaded File) - Use %LocalPath% to get the uploaded file
- Destination Directory (Directory to be moved)
Click Ok to save the settings. That's it. Now you know how to use the custom function FileContentCompare and move file on compare content with another file in the server.