FTP - Loop Folder List

in Task or Workflow of the Month, posted 9/5/08

This sample task will demonstrate how AutoMate can loop folders via FTP and write the folder list to a .txt file. AutoMate will do the following:

1. Logon to a FTP server.

2. Execute the "Get long file list" command using AutoMate’s FTP Advanced action and populate a dataset with the results.

3. Loop through the dataset, which has a list of files and folders on the FTP server.

4. Write the folder list to a .txt file.

The dataset %FileList.FTPFileType% will either have a value of “1” or “0”. If the value is “0” then it’s a folder and if the value is “1” then it’s a file. This sample task will loop through the dataset and only look for the “0” values and write to a .txt file.

To check out the task and download it yourself, click here.