Previous Topic

Next Topic

Book Contents

Book Index

File Loop

The following example shows how an Advanced Task can be used to create a single task to download encrypted files, archive them, then decrypt and save the decrypted version of the file to file server.

In this example, the goal is to archive encrypted files that are initially stored on a host in a branch office that is remote to the MOVEit Automation host, and to also do some processing on the downloaded files.

We will create a task that downloads encrypted files from the EncryptionsA folder on Host A at the branch, archives the files to the EncryptionsC folder on your local Host C (the MOVEit Automation host), then decrypts each file, and sends the decrypted file to the EncryptionsB folder on Host B.

  1. In the Tasks tab, click Add Task. The Add New Task dialog opens.

  2. In the New Name box, enter a descriptive name for the task: "Archive on Host C, then decrypt and save to Host B".
  3. For Task Type, select Advanced.
  4. Click OK.

    The task is added to the list of tasks. This task is marked with a red X to indicate that it cannot yet be run. This differs from a Traditional Task in that we do not complete a wizard before the task is added to the task list. We will right-click the task name to select the task elements to be added to this task.

  5. Right-click the task, and select Add source. The Define New Source dialog opens.
    1. In the Define New Source dialog, select Download from FTP server, then select Host A, then click OK. The FTP Source - Host A dialog opens.
    2. Browse for and select the EncryptionsA folder. This is the folder that holds the encrypted (.pgp) files. We want to select all files in this folder, so we'll keep the default File(s) selection (*.*), then click OK. The source is now added to the task.

      When you add a source to an Advanced Task, MOVEit Automation displays a message asking whether you want to add a File Loop. In most cases, you will want to use a File Loop so you can apply elements to all files in the source list.

  6. Click Yes to add a File Loop. (If the message does not appear, then right-click the source definition and select Add File Loop.) The File Loop is added to the task. The "For each file ..." statement indicates for each file downloaded from the source, any task element that we put in this file loop will be run on that file.

  7. Right-click the File Loop (For each file ...) and select Add Destination.
    1. In the Define New Destination dialog, select Save to local folder, then click OK. The Edit Local Folder Destination dialog opens.
    2. Browse for and select the EncryptionsC folder, then click OK. This is the destination for the .pgp files. The destination is now added to the task.

  8. Right-click the Destination (Save into...) and select Add Process. The Add Process dialog opens. Under Scripts, select "PGP Decrypt" and click OK. The process is added to the task. This will take a .pgp file in the EncryptionsC folder, and decrypt it.

  9. Right-click the Run PGP Decrypt Process, and select Add Destination. The Define New Destination dialog opens.
    1. In the Define New Destination dialog, select Upload into FTP server, then select Host B, then click OK. The FTP Destination - Host B dialog opens.
    2. Browse for and select the EncryptionsB folder. This is the archive destination for the decrypted files. The destination is now added to the task.

We now have the completed task. When run, this task will download .pgp files from Host A and archive the files on local host (Host C), then decrypt each .pgp file and push the decrypted files to Host B.

You can add a schedule, or other sources, destinations, file loops, if blocks, or emails.