> ## 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.

# WdCopySearchOptions

> WdCopySearchOptions

# WdCopySearchOptions

복사 작업에 사용할 파일 및 디렉터리 필터 패턴을 지정합니다.

## 구문

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

### 멤버

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

복사 작업에 포함할 파일을 지정하는 glob 패턴입니다(예: 모든 파일을 포함하려면 `"*"`, 실행 파일과 DLL만 포함하려면 `"*.exe;*.dll"`).

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

복사 작업에서 제외할 파일을 지정하는 glob 패턴입니다(예: 디버그 기호를 제외하려면 `"*.pdb"`).

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

복사 작업에서 제외할 디렉터리를 지정하는 glob 패턴입니다(예: Visual Studio 및 빌드 출력 디렉터리를 제외하려면 `".vs;obj"`).

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

복사에 포함되기 위해 파일이 가져야 하는 파일 특성의 비트마스크입니다. 특성으로 필터링하지 않으려면 `0`으로 설정합니다. 파일 특성에 대한 추가 정보는 [File Attribute Constants](https://learn.microsoft.com/windows/win32/fileio/file-attribute-constants)를 참조하세요.

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

복사에서 파일을 제외하는 원인이 되는 파일 특성의 비트마스크입니다. 특성으로 필터링하지 않으려면 `0`으로 설정합니다. 파일 특성에 대한 추가 정보는 [File Attribute Constants](https://learn.microsoft.com/windows/win32/fileio/file-attribute-constants)를 참조하세요.

## 예제

**`.exe`와 `.dll` 파일만 복사:**

```cpp theme={null}
WdCopySearchOptions searchOptions = {
    .includeFilePattern = "*.exe;*.dll",
    .excludeFilePattern = nullptr,
    .excludeDirPattern = nullptr,
    .includeFileAttributes = 0,
    .excludeFileAttributes = 0
};
```

**복사에서 `temp`라는 이름의 디렉터리 제외:**

```cpp theme={null}
WdCopySearchOptions searchOptions = {
    .includeFilePattern = nullptr,
    .excludeFilePattern = nullptr,
    .excludeDirPattern = "temp",
    .includeFileAttributes = 0,
    .excludeFileAttributes = 0
};
```

**읽기 전용 또는 시스템 파일만 복사하고 숨김 파일은 제외:**

```cpp theme={null}
WdCopySearchOptions searchOptions = {
    .includeFilePattern = nullptr,
    .excludeFilePattern = nullptr,
    .excludeDirPattern = nullptr,
    .includeFileAttributes = FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM,
    .excludeFileAttributes = FILE_ATTRIBUTE_HIDDEN
};
```

<Note>포함 패턴과 제외 패턴이 충돌하는 경우 제외 패턴이 우선하며 해당 파일은 복사되지 않습니다.</Note>

## 설명

이 구조체를 [WdRemoteCopy](/reference/remoting/functions/wdremotecopy)의 `searchOptions` 매개 변수로 전달하여 복사 작업에 포함할 파일과 디렉터리를 필터링합니다. `searchOptions`에 `nullptr`이 전달되면 필터링 없이 모든 파일이 복사됩니다.

## 요구 사항

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

## 함께 보기

* [WdRemoteCopy](/reference/remoting/functions/wdremotecopy)
* [XBOX PC Remote Iteration API](/reference/remoting/remoteiteration_members)


## Related topics

- [WdRemoteCopy](/ko/reference/remoting/functions/wdremotecopy.md)
- [XBOX PC Remote Iteration API](/ko/reference/remoting/remoteiteration_members.md)
- [WdCopyOptions](/ko/reference/remoting/structs/wdcopyoptions.md)
- [WdCopyDirection](/ko/reference/remoting/enums/wdcopydirection.md)
- [WdCopyErrorCallback](/ko/reference/remoting/callbacks/wdcopyerrorcallback.md)
