- Documentation
- Activities
- Files & Folders
- Empty folder
Delete everything inside a folder, keeping the folder itself
Inputs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
Folder folderPath | folder | Required | — | The folder to clear. The folder itself is kept. |
Only Files Matching filePattern | string | Optional | — | Optional, e.g. *.csv. Leave blank to delete every file. |
Also delete subfolders includeSubfolders | boolean | Optional | false | Off by default. When on, subfolders and everything in them are removed. |
Output Variable outputVariable | variable | Optional | FilesDeleted | — |
Output
FilesDeletedNumberHow many files were deleted
Compatibility
WindowsLinuxAttendedUnattended
Related activities
Create Folder
Create a new folder
Delete folder
Remove a folder and all its contents
Folder Exists
Check if a folder exists at a specific location
For each file in folder
Repeat actions for every file inside a folder
Get Files
Get a list of all files in a folder, optionally filtered by pattern
Rename folder
Change the name of a folder