FTP - Loop Folder List

Loop folders via FTP and write the folder list to a .txt file

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 its a folder and if the value is 1 then its a file. This sample task will loop through the dataset and only look for the 0 values and write to a .txt file.

Task Category:

FTP