How To Monitor Moved Files Without Using Directory Monitors

Learn how to automatically execute tasks in response to a file movement
  1. Blog

There are times when, as part of a business process, you'd want to monitor files that have been moved from one directory to another. Once a particular file is moved, you might want to kick off a subsequent task or series of tasks in response to that move event. The traditional way of doing this with JSCAPE MFT Server was to create 1) a directory monitor for each destination directory and then 2) a trigger that would respond to the file movement. We now have a more efficient solution.

In the latest version of JSCAPE MFT Server, you can now simply create a trigger that uses the Move File event type. This would eliminate the need of creating directory monitors for this particular purpose, which would in turn enable you to reduce consumption of compute resources.

Watch the video

So, let's say for example, you have a trigger that picks up a particular file from the folder C:\sample\testupload and moves that file to the folder C:\sample\teststorage.

move file trigger action

move file action parameters

To respond to this particular file movement, you may now add a trigger...

add trigger-1

... and have that trigger listen to the File Move event type.

file move event type

In cases where you have several triggers that listen to the File Move event type and you want this particular trigger to respond only to a particular file movement, you can add a corresponding trigger condition. For example, you can add a condition that would let this trigger respond only to those File Move events whose destination directory is C:\sample\testorage.

trigger condition file move

Once you've specified a trigger condition, you can then proceed and add a trigger action or actions that would execute if the trigger condition evaluates to true.

Here, in this example, I just want to create a rudimentary log file that would record each successfully moved file. To do that, I'll just add the Append File trigger action...

append file action to file move

... specify a file, and enter some pertinent variables into the Message box, like the Month, DayOfMonth, Year, SourceFile, and DestinationFile.

append file action parameters

So, when a file is moved to the C:\sample\teststorage directory, all that information about that file movement will be recorded into the move_logs text file.

That's it. Now you know how to monitor moved files without using Directory Monitors on JSCAPE MFT Server.

Try this yourself

Would you like to try this yourself? Download the FREE, fully-functional Starter Edition of JSCAPE MFT Server now.

Download JSCAPE MFT Server Trial