Name

Remote Copy — \windows\system32\rcp.exe

Synopsis

Copies files between two remote computers.

To Open

Command Prompt rcp

Usage

rcp [-b] [-h] [-r] source 
                     destination
                  

Description

Remote Copy is a little tool you can use to copy one or more files from one remote computer to another remote computer without first transferring the files to your own computer. Remote Copy takes the following parameters:

source, destination

The full network path of the source file and destination, respectively. See the examples below for syntax. Specify a folder name for source to transfer that folder and all of its contents. You can specify wildcards here (to transfer multiple files at once), but only with an escape character (e.g., apple.* becomes apple.\*).

-b

Transfers the files with binary mode; the default is ASCII mode. See the discussion of ASCII and binary modes in FTP, discussed earlier in this chapter.

-h

Include the -h parameter to transfer hidden files.

-r

When copying a folder, include all the subfolders and their contents.

Examples

The following command transfers the file, c:\docs\rings.txt, from the computer called cooder to the c:\stuff folder in the computer called spud:

rcp -b \\cooder\c\docs\rings.txt \\spud\

The following command does the same thing, but using IP addresses (when accessing computers on the Internet) instead of on a local network.

Note how the usernames (mandatory with IP addresses) are specified:

rcp -b 192.168.0.1.cooder:c\docs\rings.txt 192.168.0.1.spud:c\stuff

Notes ...

Get Windows XP in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.