{{ transformations:FolderListAction.png}}
====== LIST OF FOLDERS ======
Category: Create / Generate\\
\\
=====Description=====
This action creates a table with a list of folders in the specified folder.\\
\\
=====Use cases=====
Such a table can be used later for iterations, folder commands, or file commands.\\
\\
=====Action settings=====
^ Setting ^ Description ^
|Folder*|The folder to extract the list of //direct// subfolders from.|
|Columns|Provides options to select the types of data to return as fields in the dataset. See below.|
|Subfolders|Provides options to scan through subfolders within the chosen folder. See below.|
* Setting can be specified using a [[:parameters|parameter]].\\
\\
====Columns====
These options define the columns that will be included in the generated dataset. At least one option must be selected.
^Option^Description^
|Folder name with pull path|Returns the fully-qualified folder name including absolute path. Default.|
|Folder name only|Returns the folder name only, excluding path.|
|Date created|The date the folder was first created.|
|Date modified|The date the folder was last changed or updated.|
|Read-only|Returns a "true"/"false" value signifying whether the folder is flagged as read-only (TRUE) or read-write (FALSE).|
\\
====Subfolders====
^Option^Description^
|Scan subfolders|When selected, additional options are presented to define the //scan depth// and //scan error handling//.|
|Scanning depth|The number of subfolder levels, under the parent folder, the action will scan within. e.g. "1" will scan through the\\ subfolders found //directly// under the parent folder only; "2" will scan through the subfolders of the subfolders\\ (i.e. 2 levels deep) found under the parent folder.|
|Ignore scan errors|Select to ignore any errors produced when scanning subfolders for files. This is useful for avoiding errors when\\ scanning folder depths that may not exist in all subfolders.|
\\
=====Community examples=====
* [[https://community.easymorph.com/t//2156/1|How to process parent-child data structures]] ([[https://community.easymorph.com/uploads/short-url/zmylfn4Qr0ovzu3e5rybl0LVMNG.morph|Project]]; Module: //Scan 1 folder//; Group: //Tab 1//; Table: //Desktop//; Action position: //1//)
\\
=====Shortcuts=====
Fast ways to create the action:
* Press the "Add data" menu button. Pick "Generate data".
* Drag a folder with subfolders into the application window. Select "Generate a list of folders in the folder".
\\
=====See also=====
* [[transformations:filelist|List of files]]
* [[transformations:iterate|Iterate]]
* [[transformations:iterateprogram|Iterate external program]]