> ## 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 方法

> IXtfBatchFileIOClient::CopyFiles 方法

# IXtfBatchFileIOClient::CopyFiles 方法

在開發主機上的兩個位置之間，批次複製字串清單中列舉的檔案，並傳回作業的相關資訊。

<Note>此方法已淘汰。請改用 [IXtfFileIOClient::CopyFiles](/zh-TW/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

指定如何複製檔案的旗標。此參數是下表所列巨集的位元 OR 組合。

| 值 | 巨集 | 描述 |
| - | - | - |
| 0x80000000 | XTFCOPYFILE\_DEFER | 延遲檔案複製。 |

*pCallback*\
類型：IXtfCopyFileCallback\*

指向 [IXtfCopyFileCallback](/zh-TW/reference/tools/xtf/xtffileio/classes/IXtfCopyFileCallback/ixtfcopyfilecallback-xtffileio-xbox-microsoft-t) 回呼的指標，當複製狀態變更時就會呼叫此回呼。

<a id="retvalSection" />

### 傳回值

類型：HRESULT

如果成功，則傳回 `S_OK`；否則傳回 HRESULT 錯誤碼。

<a id="remarksSection" />

## 備註

此函式會以批次作業的方式，在開發主機上的兩個位置之間複製字串清單中列舉的檔案，並傳回作業的相關資訊。

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

## 需求

**標頭：** xtffileio.h

**程式庫：** xtffileio.lib

**支援的平台：** Windows (適用於 XBOX 主機工具)

## 另請參閱

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


## Related topics

- [IXtfBatchFileIOClient::CopyFiles Method](/zh-CN/reference/tools/xtf/xtffileio/classes/IXtfBatchFileIOClient/methods/copyfiles-ixtfbatchfileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfBatchFileIOClient::CopyFiles (método)](/es/reference/tools/xtf/xtffileio/classes/IXtfBatchFileIOClient/methods/copyfiles-ixtfbatchfileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfBatchFileIOClient::CopyFiles 메서드](/ko/reference/tools/xtf/xtffileio/classes/IXtfBatchFileIOClient/methods/copyfiles-ixtfbatchfileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::CopyFiles Method](/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/copyfiles-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
- [IXtfFileIOClient::CopyFiles (método)](/es/reference/tools/xtf/xtffileio/classes/IXtfFileIOClient/methods/copyfiles-ixtffileioclient-xtffileio-xbox-microsoft-m.md)
