🧡 Skip to main content🔍 Skip to search

Ensure that a directory exists, is empty, or is absent on a remote server. Supported server types are FTP, SFTP, WebDAV, Amazon S3, Google Cloud Storage, and DigitalOcean Spaces.

This Action essentially combines Create Remote Directory and Remove Remote Directory into one convenient Action, allowing you to ensure that a path on a remote server is either valid or invalid.

DirectoryDetails
Directory Path and name of a directory to be checked. The remote directory is created, removed, cleaned, or left intact depending on the selected option. Intermediate directories are also seamlessly ensured.
Make sure that it Desired state of the remote directory:
  • Exists · ensures that the directory exists by creating it (if necessary) along with all intermediary subdirectories as well.
  • Exists and is empty · ensures the directory exists by creating it and all necessary intermediary directories if they do not already exist. If the directory is already present, this Action ensures it is empty of any files or subdirectories.
  • Exists and contains no files · ensures the directory exists and that its root is free of files, though files and subdirectories within its subdirectories are allowed. This action creates the directory or path if required. If the directory already exists, it ensures that any files are removed from its root leaving subfolders intact.
  • Does not exist · makes sure that the provided directory does not exist. It removes the directory along with its contents if necessary.

All operations, such as creating, removing, and clearing, are performed only if necessary. If the specified directory already meets the ensure condition and is in the desired state, this Action does nothing and simply continues with the workflow execution.
Use connectionSelect an existing connection to use for directory operation. If there are no defined connections, the new connection window will be opened to establish a connection to FTP, SFTP, WebDAV, Amazon S3, Google Cloud Storage, or DigitalOcean Spaces server.
Variable WizardVariable Wizard buttonUse dynamic data input—substitute a parameter from a file, web, connected Trigger, other Actions, date and time presets, etc.

Interconnect

  • Dynamic variables & Events of the Ensure Remote Directory. Access the variable containing information about a directory that was created, removed, or simply ensured (if already match the condition). Additionally, logs detail the intended directory state, actions taken on the directory, and any failures that occur.

Need a helping hand?

If you have any questions, please do not hesitate to contact our support team.