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

# IXtfBatchFileIOClient::CopyFiles Method

> IXtfBatchFileIOClient::CopyFiles Method

# IXtfBatchFileIOClient::CopyFiles Method

在开发主机上的两个位置之间批量复制字符串列表中枚举的文件，并返回有关此操作的信息。

<Note>此方法已弃用。请改用 [IXtfFileIOClient::CopyFiles](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/copyfiles-ixtffileioclient-xtffileio-xbox-microsoft-m) 方法。</Note>

<a id="syntaxSection" />

## 语法

```cpp theme={null}
public:
HRESULT CopyFiles(
         LPCWSTR pszRootDirectory,
         LPCWSTR *rgszRootDirectoryRelativeFiles,
         DWORD cRootDirectoryRelativeFiles,
         LPCWSTR pszDstDirectoryName,
         DWORD dwFlags,
         IXtfCopyFileCallback *pCallback
)  
```

<a id="parametersSection" />

### 参数

*pszRootDirectory*\
类型：LPCWSTR

指向批量复制的根目录的指针。

*rgszRootDirectoryRelativeFiles*\
类型：LPCWSTR\*

指向字符串列表的指针，该列表包含要复制的文件的名称。

*cRootDirectoryRelativeFiles*\
类型：DWORD

批量复制的文件数量。

*pszDstDirectoryName*\
类型：LPCWSTR

指向批量复制的目标目录名称的指针。

*dwFlags*\
类型：DWORD

指定如何复制文件的标志。此参数是下表中列出的宏的按位或组合。

| 值          | 宏                  | 描述      |
| ---------- | ------------------ | ------- |
| 0x80000000 | XTFCOPYFILE\_DEFER | 延迟文件复制。 |

*pCallback*\
类型：IXtfCopyFileCallback\*

指向 [IXtfCopyFileCallback](/reference/tools/xtf/xtffileio/classes/IXtfCopyFileCallback/ixtfcopyfilecallback-xtffileio-xbox-microsoft-t) 回调的指针，用于在复制状态发生变化时调用。

<a id="retvalSection" />

### 返回值

类型：HRESULT

如果成功，则返回 `S_OK`；否则返回 HRESULT 错误代码。

<a id="remarksSection" />

## 备注

此函数在开发主机上的两个位置之间以批量操作的方式复制字符串列表中枚举的文件，并返回有关此操作的信息。

<Note>此方法已弃用。请改用 [IXtfFileIOClient::CopyFiles](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/copyfiles-ixtffileioclient-xtffileio-xbox-microsoft-m) 方法。</Note>

## 要求

**头文件：** xtffileio.h

**库：** xtffileio.lib

**支持的平台：** Windows（用于 XBOX 主机工具）

## 另请参阅

[IXtfFileIOClient::CopyFiles](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/copyfiles-ixtffileioclient-xtffileio-xbox-microsoft-m)\
[IXtfBatchFileIOClient Interface](/reference/tools/xtf/xtffileio/classes/IXtfBatchFileIOClient/ixtfbatchfileioclient-xtffileio-xbox-microsoft-t)\
[XtfFileIO](/reference/tools/xtf/xtffileio/xtffileio-xbox-microsoft-n)


## Related topics

- [IXtfFileIOClient::CopyFiles Method](/zh-CN/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/copyfiles-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfCopyFileCallback::OnEndFileCopy Method](/zh-CN/reference/tools/xtf/xtffileio/classes/IXtfCopyFileCallback/methods/onendfilecopy-ixtfcopyfilecallback-xtffileio-xbox-microsoft-m.md)
- [IXtfCopyFileCallback::OnStartFileCopy Method](/zh-CN/reference/tools/xtf/xtffileio/classes/IXtfCopyFileCallback/methods/onstartfilecopy-ixtfcopyfilecallback-xtffileio-xbox-microsoft-m.md)
- [IXtfCopyFileCallback::OnFileCopyProgress Method](/zh-CN/reference/tools/xtf/xtffileio/classes/IXtfCopyFileCallback/methods/onfilecopyprogress-ixtfcopyfilecallback-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::DeleteFiles Method](/zh-CN/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/deletefiles-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
