Skip to main content

Delete File

AutomatR.SFTP.DeleteFile

The "Delete File" activity in AutomatR is part of the SFTP activities package, allowing users to delete files from an SFTP server. This activity streamlines file management tasks on an SFTP server, enhancing the efficiency of automation workflows.

Properties

NameDescription
Input
ClientSpecifies the SFTP client object to connect to the SFTP server.
Server PathSpecifies the path on the SFTP server where the file exists.
Server FilesSpecifies a list of file names to be deleted from the SFTP server.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the activity. Useful for handling synchronization issues.

How to use:

  1. Drag and drop the "Delete File" activity onto the workflow.
  2. Configure the properties by specifying the SFTP client, server path, and the list of file names to be deleted.
  3. Optionally, configure the delay if needed.
  4. Execute the workflow to delete the specified files from the SFTP server.

Example:

Consider an example where the "Delete File" activity is used to delete files named "file1.txt" and "file2.txt" from the "/Documents/" directory on the SFTP server:

Delete File:
Display Name: "Delete Files from SFTP"
Client: sftpClientObject
Server Path: "/Documents/"
Server Files: ["file1.txt", "file2.txt"]

In this example, the activity deletes the specified files from the "/Documents/" directory on the SFTP server using the provided SFTP client object.