The login name on the remote server. If this is omitted, and host is a PuTTY saved session, PSCP will use any username specified by that saved session. Otherwise, PSCP will attempt to use the local Windows username.
5.2.1.2 host
The name of the remote server, or the name of an existing PuTTY saved session. In the latter case, the session's settings for hostname, port number, cipher type and username will be used.
5.2.1.3 source
One or more source files. Wildcards are allowed. The syntax of wildcards depends on the system to which they apply, so if you are copying from a Windows system to a UNIX system, you should use Windows wildcard syntax (e.g. *.*), but if you are copying from a UNIX system to a Windows system, you would use the wildcard syntax allowed by your UNIX shell (e.g. *).
If the source is a remote server and you do not specify a full pathname (in UNIX, a pathname beginning with a / (slash) character), what you specify as a source will be interpreted relative to your home directory on the remote server.
5.2.1.4 target
The filename or directory to put the file(s). When copying from a remote server to a local host, you may wish simply to place the file(s) in the current directory. To do this, you should specify a target of .. For example:
pscp fred@example.com:/home/tom/.emacs .
...would copy /home/tom/.emacs on the remote server to the current directory.
As with the source parameter, if the target is on a remote server and is not a full path name, it is interpreted relative to your home directory on the remote server.
5.2.2 Options
PSCP accepts all the general command line options supported by the PuTTY tools, except the ones which make no sense in a file transfer utility. See
section 3.8.3
for a description of these options. (The ones not supported by PSCP are clearly marked.)
PSCP also supports some of its own options. The following sections describe PSCP's specific command-line options.
5.2.2.1 -ls list remote files
If the -ls option is given, no files are transferred; instead, remote files are listed. Only a hostname specification and optional remote file specification need be given. For example:
pscp -ls fred@example.com:dir1
The SCP protocol does not contain within itself a means of listing files. If SCP is in use, this option therefore assumes that the server responds appropriately to the command ls -la; this may not work with all servers.
If SFTP is in use, this option should work with all servers.
5.2.2.2 -p preserve file attributes