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

# File copy (xbcp.exe)

> File copy (xbcp.exe)

Use this tool to copy one or more files to or from a remote console.

| Column 1                                                                                                                                |
| --------------------------------------------------------------------------------------------------------------------------------------- |
| **xbcp** *source* \[*target*] \[/A\[*:attributes*] ] \[/B] \[/M] \[/S\[*:levels*] ] \[/W] \[/X\[*:address*] \[*+accesskey*] \[/title] ] |

| Option                                    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| *source*                                  | The source files' names or directory. Wildcard characters in the file name are supported. For details, see the [Remarks](#remarks) section later in this topic.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| *target*                                  | The target file's name or directory. When more than one file is copied, the target must be a directory. If the target directory doesn't exist, it's created. For details, see the [Remarks](#remarks) section later in this topic.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| /A\[*:attributes*]                        | Copies only files with the specified attributes. If no attributes are specified, it copies all non-system files that aren't hidden.<br />• **H** Hidden files<br />• **R** Read-only files<br />• **S** System files<br />• **A** Files that are ready for archiving<br />• **-** Negation prefix; copies files that *don't* have the specified flag                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| /B                                        | Uses bare format; only file names are displayed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| /M                                        | Prints a summary of the transfer performance metrics after all files have been transferred.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| /S\[*:levels*]                            | Copies files that are in a specified directory and all its subdirectories. *levels* is an optional integer that specifies the subdirectory recursion depth. For example, **xbcp /S:1** processes only the specified directory and the subdirectories one level below it. If **/S** is specified but *levels* isn't, all subdirectories are included.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| /W                                        | Copies files by using FILE\_SHARE\_WRITE semantics.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| /X\[*:address*] \[*+accesskey*] \[/title] | • Use this option to specify the host name or address (shown as **Tools IP** on the console) of a targeted console without changing the default console. For details about setting a host name for a console, see [Setting a host name for the console IP address](/home/setup-install/dev-kit-settings/setting-a-hostname).<br />• If you don't use this option, the default console (previously set by [Connect (xbconnect.exe)](/tools/tools-console/commandlinetools/xbconnect)) is used.<br />• Use the *accesskey* string to provide console access only to those people who have the access key.<br />•  Set the access key by using the command **xbconfig** **accesskey=your-key**, and then restart your console to make the access key effective.<br />• To access a console that's configured with an access key, include a plus sign (+) and the access key after the IP address or host name of the console.<br />• If an access key is provided when the default console is set by [xbconnect](/tools/tools-console/commandlinetools/xbconnect), the access key is stored as part of the default console's address.<br />• For more information about access keys, see [xbconfig accesskey](/tools/tools-console/commandlinetools/xbconfig).<br />• If you append **/title** to **/X**, after the address or by itself, the partition mapping that's seen by a running exclusive app is used. For example, specifying **/X/title xd:** would provide access to the default console's scratch-drive partition that's visible to the running exclusive apps. |
| /LC                                       | Specify the locale code. Used to overide the default locale code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

<a id="remarks" />

## Remarks

### Targeting files and directories in the shared scratch-drive partition

The drive-D partition is now accessible as a shared scratch space in the system and from within the Game OS. To copy titles in this shared drive, use **xbcp** (with or without the **/x/title** address) to access the drive partitions and files that are being used by the exclusive resource app. For example, to copy all files from the console scratch drive, use one of the following commands.

```text theme={null}
xbcp /X:/Title /S xd:\ c:\
```

or

```text theme={null}
xbcp /S xd:\ c:\
```

If a legacy XBOX One Software Development Kit title is running, drive D is the legacy TitleScratch drive, which isn't the same as drive D in the system but is accessible in the system via the TitleScratch network share when the title isn't running.

<a id="ID4E2E" />

### Targeting files and directories in an app container

While an exclusive app is running, the app container is read-only and mapped to drive G in the `exclusive` partition. For example, to copy data.bin from the app container while an exclusive app is running, use the following command.

```text theme={null}
xbcp /S /X:/title XG:\ c:\
```

Apps that are packaged at build time are read-only. Files and directories can be copied for these apps but can't be added, deleted, or modified.

<a id="ID4EIF" />

## See also

[Command-line tools](/tools/tools-console/commandlinetools/commandlinetools)

[XTF transport errors](/tools/tools-console/commandlinetools/xtf-transport-errors)

[Connect (xbconnect.exe)](/tools/tools-console/commandlinetools/xbconnect)

[Deploying your title to your XBOX Development Kit](/home/setup-install/concepts/deployment)


## Related topics

- [Command-line tools for console development](/tools/tools-console/commandlinetools/commandlinetools.md)
- [Commandlinetools](/tools/tools-console/commandlinetools/index.md)
- [Profile-guided optimization in Visual Studio](/tools/tools-console/pgo/pgo_full.md)
- [DirectCapture Overview](/build/core-features/common/game-streaming/game-streaming-directcapture-overview.md)
- [Using Fiddler to inspect web service calls](/tools/tools-services/live-fiddler-inspect-web-calls.md)
