Skip to main content

pscp

Use pscp to copy files. The pscp program combines the DOS copy command with the Unix cp command.

Usage
pscp.exe [-r] [-u] <source> [<source> ...] <destination>
pscp.exe [-r] [-u] <source> [destination]

Argument

Description

-r

Copy files, directories and sub-directories recursively.

-u

Copy only updated files. The pscp program will copy files if the time stamp of the source file is later than the time stamp of the destination file, or if the destination file does not exist.

<source>

The source file or directory.

You can use the wild card * for any number of characters, or ? for a single character.

Note : If you specify multiple source statements, you must specify a destination directory.

If the source is a directory, you must also specify the -r option.

<destination>

Specify the destination file or directory.

If the destination directory does not exist, pscp will create it as long as only one source statement is specified.

--

Indicate that the following arguments are filenames. Use this option if you are copying a filename that begins with "-". Option is specified by a double-dash. See example 4.

Examples
  1. To copy the file test.log from the current directory to the C:\temp directory, type:

    pscp test.log "C:\temp\test.bak.log"
  2. To copy all updated log files from C:\temp subdirectories to the current directory on the C drive, type:

    pscp -ru "C:\temp\*.log" "C:"
  3. To copy all updated log files from C:\temp subdirectories to the root directory on the C: drive, type:

    pscp.exe -ru "C:\temp\*.log" "C:\"
  4. To copy the updated file -dash.log to C:\temp, type:

    pscp.exe -u -- -dash.log "C:\temp"