In this post we're going to show you how to download files periodically from a trading partner. For this particular example, we'll be setting up JSCAPE MFT Server to connect to a trading partner every 10 minutes, download all files from a particular folder, and then delete each of those files from the remote server as soon as the download succeeds.
Prefer to watch a video version of this instead?
We'll be assuming you already have an existing trading partner object configured on your JSCAPE MFT Server instance. The trading partner can be pointing to almost any file transfer server, including AFTP, AS2, FTP, FTPS, SFTP, and many others. If you're not familiar with trading partners in the context of JSCAPE MFT Server, we suggest you watch the video: Using Trading Partners.
Once you have a trading partner object set up, create a new trigger. For those who are not yet familiar with triggers, watch the video: Automating File Transfer Processes Using Triggers.
Give the new trigger a descriptive name, say "S3 TP 10 Minute Periodic Download and Delete".
After that, select the Current Time event type.
Click Next to proceed.
Because we want this trigger to fire every 10 minutes, we need to write an expression for that. You may write the expression manually but the easiest way would be to use the Time Expresssion tool. Click the button labeled Time Expression to launch that tool...
and then, in the Minute text field, enter 0,10,20,30,40,50.
After clicking OK, JSCAPE MFT Server will automatically generate the corresponding expression in the Trigger Conditions box likeso. Click Next to proceed.
We're now ready to add the trigger action that would connect to your trading partner, download all files from a particular directory, and then delete each file after each successful download.
Click the Add button to add that trigger.
For this purpose, we'll need the Trading Partner Regex File Download trigger action. Select that from the drop down list and then click OK.
As soon as the trigger action parameters dialog appears, select the trading partner from the Partner drop down list.
You will also have to specify the remote directory or subdirectory which you will be downloading files from.
Because we want to download all files, just enter *.* into the regular expression field. If you want to download specific sets of files, then you'll have to enter the appropriate regular expression into that field.
Now, because we're using *.*, we'll need to select Wildcard for the Expression Type. Otherwise, select Regular Expression.
You'll also need to specify the Local Directory into which the downloaded files will be stored.
Lastly, because we want to delete each downloaded file from the remote directory, tick the Delete on Success checkbox.
Click the OK buttons until you're back at the main screen.
That's it. Now you know how to configure JSCAPE MFT Server to carry out periodic downloads from a trading partner.
Want to try this out? Download the free, fully-functional evaluation edition of JSCAPE MFT Server.
Want to be updated on posts like this? Connect with us...