> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WdCopyOptions

> WdCopyOptions

Specifies the direction and common root alias for a copy operation.

**Introduced in:** [RIT 0.0.8-Preview](https://docs.xbox.com/reference/remoting/release-versions.md#release-versions).

## Syntax

```cpp theme={null}
struct WdCopyOptions
{
    WdCopyDirection copyDirection;
    const char* commonRootAlias;
};
```

### Members

`copyDirection`\
Type: **[WdCopyDirection](https://docs.xbox.com/reference/remoting/enums/wdcopydirection.md)**

The direction of the copy operation. Use `CopyTo` to push files from the local PC to the remote device, or `CopyFrom` to pull files from the remote device to the local PC. `WdCopyDirection::CopyTo` is the default value if not specified.

**`CopyFrom` supported from:** [RIT 0.0.13-preview](https://docs.xbox.com/reference/remoting/release-versions.md#release-versions). See [WdRemoteCopy change history](https://docs.xbox.com/reference/remoting/functions/wdremotecopy.md#change-history).

`commonRootAlias`\
Type: **const char\***

An optional alias for a common root directory on the remote device (UTF-8). If the remote path (`destinationPath` for `CopyTo`, `sourcePath` for `CopyFrom`) is absolute, `commonRootAlias` will be ignored.

## Remarks

Pass this structure to [WdRemoteCopy](https://docs.xbox.com/reference/remoting/functions/wdremotecopy.md) to control the copy behavior. If `nullptr` is passed for the `copyOptions` parameter of `WdRemoteCopy`, the copy direction defaults to `CopyTo` and the default common root location is used if the destination path is relative.

Common roots allow users to use pre-configured known locations where games are copied to or launched from, and refer to them by alias instead of full path.

## Requirements

| Requirement | Value |
| - | - |
| **Header** | WdRemoteIteration.h |
| **Library** | wdremoteapi.lib |
| **Supported OS** | Windows 11 and later |
| **Supported architectures** | x64, ARM64 |

## See also

* [WdRemoteCopy](https://docs.xbox.com/reference/remoting/functions/wdremotecopy.md)
* [WdCopyDirection](https://docs.xbox.com/reference/remoting/enums/wdcopydirection.md)
* [XBOX PC Remote Iteration API](https://docs.xbox.com/reference/remoting/remoteiteration_members.md)


## Related topics

- [WdCopyDirection](https://docs.xbox.com/reference/remoting/enums/wdcopydirection.md)
- [WdRemoteCopy](https://docs.xbox.com/reference/remoting/functions/wdremotecopy.md)
- [XBOX PC Remote Iteration API](https://docs.xbox.com/reference/remoting/remoteiteration_members.md)
- [WdCopySearchOptions](https://docs.xbox.com/reference/remoting/structs/wdcopysearchoptions.md)
- [WdDeleteRemoteFiles](https://docs.xbox.com/reference/remoting/functions/wddeleteremotefiles.md)
