- Documentation
- Activities
- Files & Folders
- For each file in folder
Repeat actions for every file inside a folder
Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Folder Path folderPath | folder | Required | Not set | |
File Filter fileFilter | string | Optional | Not set | |
Include Subfolders includeSubfolders | boolean | Optional | false | |
Sort By sortBy | enum | Optional | name | namedatesize |
Current File Variable currentFileVariable | variable | Optional | CurrentFile | |
File List Variable outputVariable | variable | Optional | FolderFiles |
Output
$outputVariableArrayList of files found in the folder. Each element is an object with .path, .name, .extension, .sizeBytes, .modifiedDate. Use {CurrentFile.name} inside the loop, or {FolderFiles[0].path} after it.
pathStringnameStringextensionStringsizeBytesNumbermodifiedDateString
Compatibility
WindowsLinuxAttendedUnattended
Related activities
Create Folder
Create a new folder
Delete folder
Remove a folder and all its contents
Empty folder
Delete everything inside a folder, keeping the folder itself
Folder Exists
Check if a folder exists at a specific location
Get Files
Get a list of all files in a folder, optionally filtered by pattern
Rename folder
Change the name of a folder