File Copy (xbcp.exe)

Copies one or more files to or from a remote console.

Note If an exclusive resource app is not running it is now recommended to use copy with the package network share \\SystemIP\PackagePath instead of using xbcp. See Xbox One Neighborhood: Accessing the Console File System from Your PC for more information.

xbcp source [target] [/A[:attributes] ] [/B] [/M] [/S[:levels] ] [/W] [/X[:address] [+accesskey] [/title] ]
Option Description
sourceSpecifies the source file name(s) or directory. Wildcards in the file name are supported. See remarks for more information.
targetSpecifies the target file name or directory. When copying more than one file, the target must be a directory. If the target directory does not exist, it will be created. See remarks for more information.
/A[:attributes] Copies only files with the specified attributes. If no attributes are specified, copies all non-hidden, non-system files.
Value Description
HHidden files 
RRead-only files 
SSystem files 
AFiles ready for archiving 
-Negation prefix. Copy files that do not have the specified flag. 
/BUses bare format (only filenames are displayed).
/MPrints a transfer performance metrics summary after all files have been transferred.
/S[:levels] Copies files in specified directory and all subdirectories. levels is an optional integer that specifies the subdirectory recursion depth. For example, xbcp /S:1 will only process the specified directory and subdirectories 1 level below it. If /S is specified, but levels is not, all subdirectories will be included.
/W Copies files using FILE_SHARE_WRITE semantics.
/X[:address] [+accesskey] [/title] Specifies the host name or address (shown as Tools IP on the console) of a targeted console, but does not change the default console. For information about setting a host name for a console, see Setting a Hostname for the Console IP Address. If you do not use this option, the default console (previously set by Connect (xbconnect.exe)) is used. Accesskey is a string that you can use to restrict access to a console to only those people who know the access key. Set the access key by using the command xbconfig accesskey=your-key; then, restart your console to make the access key effective. To access a console that is configured with an access key, you must include a plus sign (+) and the access key after the IP address or host name of the console. For more information about access keys, see xbconfig accesskey.
Note
If an access key is provided when the default console is set by xbconnect, then the access key is stored as part of the address of the default console.
Appending /title to /X, after the address or by itself, causes the partition mapping seen by a running exclusive app to be used. For example, specifying /X/title xd:\ would provide access to the default console's scratch drive partition that is visible to running exclusive apps. See the Targeting Files and Directories when an Exclusive Resource Aapp is Running section of remarks for more information.

Remarks

Executable files or DLL files which are simply copied, not deployed, will not be registered, and will therefore not be loadable. Use xbapp deploy or Visual Studio auto-deploy to copy application executable files to a development kit. xbcp can be used to copy other files once an executable is registered/deployed on the development kit.

Targeting Files and Directories when an Exclusive Resource app is not running

If an exclusive resource app is not running, we recommended using copy (or xcopy or robocopy) with the package network share \SystemIP\PackagePath instead of using xbcp. For more information, see Xbox One Neighborhood: Accessing the Console File System from Your PC. The file system on the console is exposed as a set of network shares.

For example, to copy all the files from the console scratch drive, use the SystemScratch network share:

xcopy \\myconsole\SystemScratch\ c:\ /s /e  

Targeting Files and Directories in an Application Container

Applications are packaged into containers at build time or at deployment. To interact with the files of an app once it is installed on the console, use the network share that is the full package name of your application.

For example, to copy a file, file.dat, into an installed app on the console, the command would be:

copy c:\file.dat \\myconsole\MyTitle_1.0.0.0_neutral__8wekyb3d8bbwe\data.bin  

Note Applications packaged at build time are read-only. Files can be copied from the share for these applications but new or updated files cannot be copied to the share.

Targeting Files and Directories in the Shared Scratch Drive Partition

The D: drive partition is accessible as a scratch space when an exclusive app is running. To access the D: drive partition when an exclusive app is not running, use the TitleScratch network share.

For example, to copy a file, logfile.log, from the exclusive application scratch drive partition use:

copy \\myconsole\TitleScratch\logfile.log c:\logfile.log  

Targeting Files and Directories when an Exclusive Resource Aapp is Running

If an exclusive resource app is running, you must use xbcp with the /x/title address to access drive partitions and files being used by the exclusive resource app. See Xbox One Neighborhood: Accessing the Console File System from Your PC for more information.

For example, to copy all the files from the directory C:\Game data to a directory with the same name (that may or may not currently exist) on the console, use the following command:

xbcp /X:/title "C:\Game data" "XD:\Game data"  

The quotes are not necessary in the command line if the names of the directories do not contain spaces.

Targeting Files and Directories in an Application Container

While an exclusive app is running, the application container is mapped to the G: drive in the exclusive partition and is read only.

For example, to copy a file, data.bin, file from the application container while an exclusive app is running, use the following command:

xbcp /X:/title XG:\data.bin c:\data.bin  

Note Applications packaged at build time are read-only. Files can be copied from the share for these applications but new or updated files cannot be copied to the share.

Targeting Files and Directories in the Shared Scratch Drive Partition

The D: drive partition is accessible as a scratch space when an exclusive app is running. To access the D: drive partition with a remote console tool while an exclusive app is running, specify XD: as the remote drive and use address the /x/title address.

For example, to copy a file, logfile.log, from the exclusive application scratch drive partition, use the following command:

xbcp /X:/title XD:\logfile.log c:\logfile.log  

See also

Command Line Tools

XTF Transport Errors

Connect (xbconnect.exe)