Simple Loop files
Loop through files in a folder and display them one at a time using a message dialog
This task will perform a simple loop through files in a folder, using the 'Loop Files' action and display them one at a time using a message dialog. It is non recursive, meaning the task will not go into and count files which are in subfolders within the folder being looped.
The 'Loop Files' action loops through the filenames contained in the folder specified. The variable specified in the Index parameter of the action is updated with the current filename. With each successive loop, the next filename is retrieved. The loop ends after all the filenames have been retrieved or when a Break is encountered.
Using the attached sample task, during the looping, the variable 'showme' will be populated with each file's name and displayed in a message dialog. Once the variable 'showme' has been populated with a files name during the loop process it can be used in numerous AutoMate actions such as displaying the files name in a dialog, performing File I/O events such as Copy File, Move File, Rename File or performing Internet actions such as HTTP Upload, FTP or E-Mail actions.