Application icon

Contents of Folder

This function is used to produce a list of the contents of a folder. The list is stored to the specified named variable and uses the default list separator (\~). You can choose to return files and folders, only files or only folders.

When not only returning folders you can filter the results by specifying the filename extensions of the file types you are interested in. The extensions are case insensitive and a leading . character is optional. The extensions are separated by spaces, commas (,), slashes (/), newline characters or the default list delimiter (\~). To filter for files which do not have a filename extension, include an item which is a single . character.

If files and folders are to be returned, a folder will have a / appended to the list item. Note that when only folders are being returned, a / is not appended to the list item.

If the Full paths option is specified, full paths will be returned as opposed to file or folder names.

By default hidden files and folders are not returned. You can set the Hidden option to override this behaviour. Note that hidden files which start with a period (.) are never returned.

The supplied text fields may contain any of the escape sequences described in Escape Sequences.

The function is only executed once per set of files while executing stepwise.

If the specified path does not exist or if it does not represent a folder, the action test state will be set to false. In this case, the destination named variable will be set to empty. If the specified folder's contents are successfully read, the action test state will be set to true.