Skip to content

cp

The copy command (and its alias cp) copies files from a session to another session or the local filesystem.

Usage: turbo cp [<options>] [<source-session>:]<source-path-from> [<target-session>:]<target-path>
Usage: turbo copy [<options>] [<source-session>:]<source-path-from> [<target-session>:]<target-path>

<options> available:
      --all-users            Applies the configuration settings to All Users
      --format=VALUE         Use the specified format for output. Supported values: json, json-stream
      --wait-after-error     Leave session open after error
      --wait-after-exit      Leave session open after it exits

Source and target paths are resolved according to the current working directory. If a source session is not specified, then the source path points to the host computer. If a target session is not specified, then the target path points to the host computer.

Examples

Copying Files

# Copies file.txt from host to current directory
> turbo copy "C:\file.txt"

# Copies file.txt from host to session c1
> turbo copy "C:\file.txt" "c1:C:\file2.txt"

# Copies file.txt from session c1 to session c2 in current directory
> turbo copy "c1:C:\file.txt" "c2:."

# Copies the contents of C:\source into C:\dest
> turbo copy "C:\source\" "C:\dest\"

# Copies the source directory itself into C:\dest, resulting in C:\dest\source
> turbo copy "C:\source" "C:\dest\"

# Copies the contents of the `data` directory from session `c1` into the `backup` directory in session `c2`
> turbo copy "c1:C:\data\" "c2:C:\backup\"

# Copies the `data` directory from session `c1` into the `backup` directory in session `c2`, resulting in `c2:C:\backup\data`
> turbo copy "c1:C:\data" "c2:C:\backup\"