Blog

Managed File Transfer and Network Solutions

Downloading Files Periodically From A Trading Partner

Posted by John Carl Villanueva on Sun, Feb 04, 2018 @ 04:32 PM

Overview

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. 

periodic download.png 

 

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

 

trading partner screenshot.png

 

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.

 

trading partner 10 minute periodic download and delete.png

 

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...

 

10 minute intervals-1.png

 

and then, in the Minute text field, enter 0,10,20,30,40,50. 

 

10 minute intervals time expression.png

 

After clicking OK, JSCAPE MFT Server will automatically generate the corresponding expression in the Trigger Conditions box likeso. Click Next to proceed.

 

10 minute intervals trigger condition.png

 

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. 

 

add trigger.png

 

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. 

 

trading partner regex file download.png

 

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.

 

trading partner regex file download parameters.png

 

Click the OK buttons until you're back at the main screen.

 

new periodic download trigger.png

 

That's it. Now you know how to configure JSCAPE MFT Server to carry out periodic downloads from a trading partner. 

Get started

Want to try this out? Download the free, fully-functional evaluation edition of JSCAPE MFT Server

 

Download Now

 

 Want to be updated on posts like this? Connect with us...

 

 

Topics: JSCAPE MFT Server, Business Process Automation, Triggers, regular expressions