Common Applications - Trigger Files

Using its scripting abilities, MOVEit Central can be configured to use a "trigger" file to force the upload of a second "data" file of the same name from a local folder. This is a situation often encountered with mainframe file transfers, where a mainframe determines which files are to be transferred by using trigger files such as these.

In this example, we have a "trigger" folder named "d:\temp\altin". This folder contains three very small text files. (The contents of these files can be anything, but it is the names of the files which are important.)

trigger1.gif (20216 bytes)

We also have a "data" folder named "d:\temp\realdata". This folder contains 6 data files, but we only want to move a few of these files up to our selected destination.

trigger2.gif (20814 bytes)

We create a new script called "GetNamedFile.vbs" and import it into MOVEit Central as as process named "GetNamedFile". This process does three things:

trigger8.gif (8055 bytes)

Next, we build a new task to download the trigger file, run the process and upload the data file.

trigger3.gif (11936 bytes)

A critical addition to the task is the use of a Task Parameter to indicate where to find the data files. Be sure to add a Task Parameter called "DataPath" to your task with the full path of your data folder.

trigger9.gif (10575 bytes)

Now, run the task, and notice that the trigger files disappear.

trigger7.gif (18735 bytes)

Also notice that only the three selected data files are gone.

trigger6.gif (19772 bytes)

Finally, notice that the data files are where they are supposed to be on the destination. (Download one or two manually to make sure!)

trigger5.gif (10046 bytes)

GetNamedFile.vbs

Dim FileName, FilePath, FullPath

FileName = MIMacro("[OrigName]")
DataPath = MIGetTaskParam("DataPath")
FullPath = DataPath & "\" & FileName

MIReplaceCacheFile(FullPath)
MIDeleteFileSecure(FullPath)