# DeleteFiles

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.FTP/tree/main/Frends.FTP.DeleteFiles>

{% tabs %}
{% tab title="Parameter: Input" %}

| Name                 | Description                                                                                                                                                                                                            |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Directory : `String` | <p>Full path of the target file to be deleted.</p><p><br>Default: <code>/</code><br>Example: <code>/destination</code></p>                                                                                             |
| FileMask : `String`  | <p>Pattern to match (Optional).</p><p>If left empty, every file is deleted from given directory.</p><p><br>Default: <code>-</code><br>Example: <code>\*.txt</code></p>                                                 |
| FilePaths : `Object` | <p>The paths to the files to be deleted, mainly meant to be used with the file trigger with the syntax: #trigger.data.filePaths</p><p><br>Default: <code>-</code><br>Example: <code>#trigger.data.filePaths</code></p> |
| {% endtab %}         |                                                                                                                                                                                                                        |

{% tab title="Parameter: Connection" %}

| Name                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Address : `String`                     | <p>FTP(S) host address.</p><p><br>Default: <code>-</code><br>Example: <code>my.ftp.server.com</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Port : `Int32`                         | <p>Port number to use in the connection to the server.</p><p><br>Default: <code>21</code><br>Example: <code>21</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                           |
| UserName : `String`                    | <p>Username to use for authentication to the server. Note that the file endpoint only supports</p><p>username for remote shares and the username must be in the format DOMAIN\Username.</p><p><br>Default: <code>-</code><br>Example: <code>myUsername</code></p>                                                                                                                                                                                                                                                                                   |
| 🗝Password : `String`                  | <p>Password to use in the authentication to the server.</p><p><br>Default: <code>-</code><br>Example: <code>myPassword</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Mode : `FtpMode`                       | <p>Connection mode to use to connect to the FTP server.</p><p>Possible values:</p><ul><li><code>Passive</code>:</li></ul><p>Connection mode to use to connect to the FTP server.</p><ul><li><code>Active</code>:</li></ul><p>Connection mode to use to connect to the FTP server.</p><p><br>Default: <code>0</code><br>Example: <code>FtpMode.Passive</code></p>                                                                                                                                                                                    |
| KeepConnectionAliveInterval : `Int32`  | <p>Sends NOOP command to keep connection alive at specified time-interval in seconds. If set to 0 the connection is not kept alive. Default value is 0</p><p><br>Default: <code>0</code><br>Example: <code>60</code></p>                                                                                                                                                                                                                                                                                                                            |
| ConnectionTimeout : `Int32`            | <p>The length of time, in seconds, until the connection times out. You can use value 0 to indicate that the connection does not time out. Default value is 60 seconds</p><p><br>Default: <code>60</code><br>Example: <code>60</code></p>                                                                                                                                                                                                                                                                                                            |
| Encoding : `String`                    | <p>If set, this encoding will be used to encode and decode command parameters and server responses, such as file names. Example values: utf-8, utf-16, windows-1252</p><p><br>Default: <code>-</code><br>Example: <code>utf-8</code></p>                                                                                                                                                                                                                                                                                                            |
| BufferSize : `Int32`                   | <p>Integer value of used buffer size as bytes.</p><p>Default value is 4 KB.</p><p><br>Default: <code>4096</code><br>Example: <code>4096</code></p>                                                                                                                                                                                                                                                                                                                                                                                                  |
| UseFTPS : `Boolean`                    | <p>Whether to use FTPS or not.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| SecureDataChannel : `Boolean`          | <p>Whether the data channel is secured or not.</p><p><br>Default: <code>True</code><br>Example: <code>true</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                               |
| SslMode : `FtpsSslMode`                | <p>Specifies whether to use Explicit or Implicit SSL</p><p>Possible values:</p><ul><li><code>None</code>:</li></ul><p>Specifies whether to use Explicit or Implicit SSL</p><ul><li><code>Explicit</code>:</li></ul><p>Specifies whether to use Explicit or Implicit SSL</p><ul><li><code>Implicit</code>:</li></ul><p>Specifies whether to use Explicit or Implicit SSL</p><ul><li><code>Auto</code>:</li></ul><p>Specifies whether to use Explicit or Implicit SSL</p><p><br>Default: <code>0</code><br>Example: <code>FtpsSslMode.None</code></p> |
| EnableClientAuth : `Boolean`           | <p>If enabled the client certificate is searched from user's certificate store</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                             |
| ClientCertificateName : `String`       | <p>Optional. Enables certification search by name from the certification store of current user.</p><p><br>Default: <code>-</code><br>Example: <code>mycert.crt</code></p>                                                                                                                                                                                                                                                                                                                                                                           |
| ClientCertificateThumbprint : `String` | <p>Optional. Enables certification search by thumbprint from the certification store of current user.</p><p><br>Default: <code>-</code><br>Example: <code>a909502dd82ae41433e6f83886b00d4277a32a7b</code></p>                                                                                                                                                                                                                                                                                                                                       |
| ValidateAnyCertificate : `Boolean`     | <p>If enabled the any certificate will be considered valid.</p><p><br>Default: <code>False</code><br>Example: <code>false</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                |
| ClientCertificatePath : `String`       | <p>Path to client certificate (X509).</p><p><br>Default: <code>-</code><br>Example: <code>c:\example.cer</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| CertificateHashStringSHA1 : `String`   | <p>Certificate SHA1 hash string to validate against.</p><p><br>Default: <code>-</code><br>Example: <code>D911262984DE9CC32A3518A1094CD24249EA5C49</code></p>                                                                                                                                                                                                                                                                                                                                                                                        |
| {% endtab %}                           |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

{% tab title="Result: Result" %}

| Name                   | Description                                                                                                      |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Files : `List<String>` | <p>Contains the input repeated the specified number of times.<br>Example: <code>Example of the output</code></p> |
| {% endtab %}           |                                                                                                                  |

{% tab title="Changelog" %}

## Changelog

### \[1.0.0] - 2024-02-20

#### Changed

* Initial implementation
  {% endtab %}
  {% endtabs %}
