Skip to main content

Empty folder

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

Delete all content (files and subfolders) in the folder, without deleting the folder itself. This command allows you to clear the contents of a specified folder while maintaining the folder structure.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Folder to empty

Please select the folder you wish to empty

File path

Yes

You can use the file browser to select a folder or enter the path manually

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

This action doesn't produce any variables.


Using Variables in Conditions

You can use variables in the "Folder to empty" parameter by clicking on the {x} icon. This allows you to dynamically specify which folder to empty based on previously defined variables in your workflow. For example, you might use a variable that contains a path determined at runtime.


Notes

  • Ensure that the specified folder exists before executing this command, otherwise an error will occur.

  • This operation cannot be undone, so use with caution as all files and subfolders will be permanently deleted.

  • The command requires appropriate permissions to delete content from the specified folder.

  • If any files in the folder are currently in use by other processes, the command may fail to delete them.

  • Consider implementing error handling to manage situations where files cannot be deleted.

Did this answer your question?