# Find

Required Frends version: 5.5+

Required .NET version: 6.0

Compatible Agents: Crossplatform

Source code: <https://github.com/FrendsPlatform/Frends.Files/tree/main/Frends.Files.Find>

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

| Name                 | Description                                                                                                                                                              |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Directory : `String` | <p>Root directory where the pattern matching should start</p><p><br>Default: <code>"c:"</code><br>Example: <code>C:\directory\</code></code></p>                         |
| Pattern : `String`   | <p>Pattern to match for files.</p><p><br>Default: <code>"</code><strong><code>\Folder\*.xml"</code></strong><br><strong>Example:</strong> <code>\Folder\*.xml</code></p> |
| {% endtab %}         |                                                                                                                                                                          |

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

| Name                                                    | Description                                                                                                                                                                                                                                                                                          |
| ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| UseGivenUserCredentialsForRemoteConnections : `Boolean` | <p>If set, allows you to give the user credentials to use to delete files on remote hosts.</p><p>If not set, the agent service user credentials will be used.</p><p>Note: This feature is only possible with Windows agents.</p><p><br>Default: <code>False</code><br>Example: <code>true</code></p> |
| UserName : `String`                                     | <p>This needs to be of format domain\username</p><p><br>Default: <code>"domain\username"</code><br>Example: <code>domain\username</code></p>                                                                                                                                                         |
| 🗝Password : `String`                                   | <p>Password for the used credentials.</p><p><br>Default: <code>-</code><br>Example: <code>testpwd</code></p>                                                                                                                                                                                         |
| {% endtab %}                                            |                                                                                                                                                                                                                                                                                                      |

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

| Name                     | Description                                                                                                                                                                                                                                                                                                                                                       |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Files : `List<FileItem>` | <p>List of files found from directory.<br>Example: <code>List \[object { string Extension, string DirectoryName, string FullPath, string FileName, bool IsReadOnly, double SizeInMegaBytes, DateTime CreationTime, DateTime CreationTimeUtc, DateTime LastAccessTime, DateTime LastAccessTimeUtc, DateTime LastWriteTime, DateTime LastWriteTimeUtc }]</code></p> |
| {% endtab %}             |                                                                                                                                                                                                                                                                                                                                                                   |

{% tab title="Changelog" %}

## Changelog

### \[1.1.0] - 2025-03-19

#### Changed

* Update packages: Microsoft.Extensions.FileSystemGlobbing 7.0.0 -> 9.0.3 System.DirectoryServices 7.0.0 -> 8.0.0 coverlet.collector 3.1.0 -> 6.0.4 Microsoft.NET.Test.Sdk 16.6.1 -> 17.13.0 MSTest.TestAdapter 2.2.7 -> 3.8.3 MSTest.TestFramework 2.2.8 -> 3.8.3 nunit 3.12.0 -> 4.3.2 NUnit3TestAdapter 3.17.0 -> 5.0.0

### \[1.0.1] - 2023-12-13

#### Changed

* Result documentation updated

### \[1.0.0] - 2023-03-07

#### Added

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