> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WdDeleteSearchOptions

> WdDeleteRemoteFiles로 삭제할 항목을 선택하는 포함 및 제외 패턴과 특성 필터를 설정하는 WdDeleteSearchOptions에 대한 참조입니다.

# WdDeleteSearchOptions

삭제 작업에 대한 파일 및 디렉터리 필터 패턴을 지정합니다.

**도입된 릴리스:** [RIT 0.0.13-preview](/ko/reference/remoting/release-versions#release-versions).

## 구문

```cpp theme={null}
struct WdDeleteSearchOptions
{
    const char* includeFilePattern;
    const char* excludeFilePattern;
    const char* excludeDirPattern;
    uint64_t includeFileAttributes;
    uint64_t excludeFileAttributes;
    uint64_t includeDirAttributes;
    uint64_t excludeDirAttributes;
};
```

### 멤버

`includeFilePattern`\
형식: **const char\***

지정된 이름과 일치하는 파일을 포함합니다. 와일드카드 문자 `*` 및 `?`가 지원되며, 패턴 목록은 세미콜론(`;`)으로 구분할 수 있습니다. 기본값은 `nullptr`이며, 모든 항목을 포함합니다.

`excludeFilePattern`\
형식: **const char\***

지정된 이름과 일치하는 파일을 제외합니다. 와일드카드 문자 `*` 및 `?`가 지원되며, 패턴 목록은 세미콜론(`;`)으로 구분할 수 있습니다. 기본값은 `nullptr`이며, 어떤 파일도 제외하지 않습니다.

`excludeDirPattern`\
형식: **const char\***

지정된 이름(경로가 아님)과 일치하는 디렉터리를 제외합니다. 와일드카드 문자 `*` 및 `?`가 지원됩니다. 기본값은 `nullptr`이며, 어떤 디렉터리도 삭제에서 제외하지 않습니다.

`includeFileAttributes`\
형식: **uint64\_t**

지정된 파일 특성 중 하나라도 설정된 파일을 포함합니다. 지원되는 값은 `FILE_ATTRIBUTE_READONLY`, `FILE_ATTRIBUTE_ARCHIVE`, `FILE_ATTRIBUTE_SYSTEM` 및 `FILE_ATTRIBUTE_HIDDEN`입니다. 기본값은 `0`이며, 모든 특성을 포함합니다. 파일 특성에 대한 자세한 내용은 [파일 특성 상수](https://learn.microsoft.com/windows/win32/fileio/file-attribute-constants)를 확인하세요.

`excludeFileAttributes`\
형식: **uint64\_t**

지정된 파일 특성 중 하나라도 설정된 파일을 제외합니다. 지원되는 값은 `FILE_ATTRIBUTE_READONLY`, `FILE_ATTRIBUTE_ARCHIVE`, `FILE_ATTRIBUTE_SYSTEM` 및 `FILE_ATTRIBUTE_HIDDEN`입니다. 기본값은 `0`이며, 어떤 특성도 제외하지 않습니다. 파일 특성에 대한 자세한 내용은 [파일 특성 상수](https://learn.microsoft.com/windows/win32/fileio/file-attribute-constants)를 확인하세요.

`includeDirAttributes`\
형식: **uint64\_t**

지정된 파일 특성 중 하나라도 설정된 디렉터리를 포함합니다. 지원되는 값은 `FILE_ATTRIBUTE_READONLY`, `FILE_ATTRIBUTE_ARCHIVE`, `FILE_ATTRIBUTE_SYSTEM` 및 `FILE_ATTRIBUTE_HIDDEN`입니다. 기본값은 `0`이며, 모든 특성을 포함합니다.

`excludeDirAttributes`\
형식: **uint64\_t**

지정된 파일 특성 중 하나라도 설정된 디렉터리를 제외합니다. 지원되는 값은 `FILE_ATTRIBUTE_READONLY`, `FILE_ATTRIBUTE_ARCHIVE`, `FILE_ATTRIBUTE_SYSTEM` 및 `FILE_ATTRIBUTE_HIDDEN`입니다. 기본값은 `0`이며, 어떤 특성도 제외하지 않습니다.

## 예제

**`.pdb` 및 `.log` 파일만 삭제:**

```cpp theme={null}
WdDeleteSearchOptions searchOptions = {
    .includeFilePattern = "*.pdb;*.log",
    .excludeFilePattern = nullptr,
    .excludeDirPattern = nullptr,
    .includeFileAttributes = 0,
    .excludeFileAttributes = 0,
    .includeDirAttributes = 0,
    .excludeDirAttributes = 0
};
```

**저장 데이터 디렉터리를 제외한 모든 항목 삭제:**

```cpp theme={null}
WdDeleteSearchOptions searchOptions = {
    .includeFilePattern = nullptr,
    .excludeFilePattern = nullptr,
    .excludeDirPattern = "SaveData",
    .includeFileAttributes = 0,
    .excludeFileAttributes = 0,
    .includeDirAttributes = 0,
    .excludeDirAttributes = 0
};
```

**보관 파일은 삭제하되 읽기 전용 파일과 숨김 디렉터리는 유지:**

```cpp theme={null}
WdDeleteSearchOptions searchOptions = {
    .includeFilePattern = nullptr,
    .excludeFilePattern = nullptr,
    .excludeDirPattern = nullptr,
    .includeFileAttributes = FILE_ATTRIBUTE_ARCHIVE,
    .excludeFileAttributes = FILE_ATTRIBUTE_READONLY,
    .includeDirAttributes = 0,
    .excludeDirAttributes = FILE_ATTRIBUTE_HIDDEN
};
```

> \[!NOTE]\
> 포함 패턴과 제외 패턴이 충돌하는 경우 제외 패턴이 우선하며 해당 항목은 삭제되지 않습니다.

## 설명

이 구조체를 `searchOptions` 매개 변수를 통해 [WdDeleteRemoteFiles](/ko/reference/remoting/functions/wddeleteremotefiles)에 전달하여 삭제 대상으로 선택할 파일과 디렉터리를 필터링합니다. `searchOptions`에 `nullptr`을 전달하면 필터링 없이 모든 항목이 포함됩니다.

이 옵션은 `remoteFolderPath`가 폴더로 확인되는 경우에만 적용됩니다. `remoteFolderPath`가 단일 파일로 확인되는 경우에는 무시됩니다.

폴더는 비어 있는 경우에만 제거되므로, 필터링된 삭제로 항목이 남아 있으면 [WdDeleteOptions](/ko/reference/remoting/structs/wddeleteoptions)에서 `deleteRootFolder`가 `true`로 설정되어 있더라도 루트 폴더는 유지됩니다.

## 요구 사항

| 요구 사항 | 값 |
| - | - |
| **헤더** | WdRemoteIteration.h |
| **라이브러리** | wdremoteapi.lib |
| **지원 OS** | Windows 11 이상 |
| **지원 아키텍처** | x64, ARM64 |

## 함께 보기

* [WdDeleteRemoteFiles](/ko/reference/remoting/functions/wddeleteremotefiles)
* [WdDeleteOptions](/ko/reference/remoting/structs/wddeleteoptions)
* [XBOX PC Remote Iteration API](/ko/reference/remoting/remoteiteration_members)


## Related topics

- [WdDeleteOptions](/ko/reference/remoting/structs/wddeleteoptions.md)
- [WdDeleteRemoteFiles](/ko/reference/remoting/functions/wddeleteremotefiles.md)
- [WdCopySearchOptions](/ko/reference/remoting/structs/wdcopysearchoptions.md)
- [WdRemoteCopy](/ko/reference/remoting/functions/wdremotecopy.md)
- [WdCopyOptions](/ko/reference/remoting/structs/wdcopyoptions.md)
