PATH
or in your current directory. To add the directory containing PSCP to your PATH
environment variable, type into the console window: PATH
more permanently on Windows NT, 2000, and XP, use the Environment tab of the System Control Panel. On Windows 95, 98, and ME, you will need to edit your AUTOEXEC.BAT
to include a set
command like the one above. pscp
on its own to bring up a usage message. This tells you the version of PSCP you're using, and gives you a brief summary of how to use PSCP: scp
command, if you're familiar with that.) /etc/hosts
from the server example.com
as user fred
to the file c:tempexample-hosts.txt
, you would type: c:documentsfoo.txt
to the server example.com
as user fred
to the file /tmp/foo
you would type: terminal.c
’ when we requested a file called ‘*.c
’. If this is a wildcard, consider upgrading to SSH-2 or using the ‘-unsafe
’ option. Renaming of this file has been disallowed’. *.c
) to the server, and the server sends back a sequence of file names that match the wildcard pattern. However, there is nothing to stop the server sending back a different pattern and writing over one of your other files: if you request *.c
, the server might send back the file name AUTOEXEC.BAT
and install a virus for you. Since the wildcard matching rules are decided by the server, the client cannot reliably verify that the filenames sent back match the pattern. -sftp
- see section 5.2.2.6.) -unsafe
command line option with PSCP: .
’.) user
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. host
source
*.*
), 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. *
). /
(slash) character), what you specify as a source will be interpreted relative to your home directory on the remote server. target
.
. For example: /home/tom/.emacs
on the remote server to the current directory. 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. -ls
list remote files-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: ls -la
; this may not work with all servers. -p
preserve file attributes-p
option preserves the original timestamp on copied files. -q
quiet, don't show statistics-q
option to PSCP suppresses the printing of these statistics. -r
copies directories recursively-r
option tells PSCP to descend into any directories you specify, and to copy them and their contents. This allows you to use PSCP to transfer whole directory structures between machines. -batch
avoid interactive prompts-batch
option, PSCP will never give an interactive prompt while establishing the connection. If the server's host key is invalid, for example (see section 2.2), then the connection will simply be abandoned instead of asking you what to do next. -batch
, if something goes wrong at connection time, the batch job will fail rather than hang. -sftp
, -scp
force use of particular protocolscp
clients) can use either of these protocols. -scp
option forces PSCP to use the SCP protocol or quit. -sftp
option forces PSCP to use the SFTP protocol or quit. When this option is specified, PSCP looks harder for an SFTP server, which may allow use of SFTP with SSH-1 depending on server setup. ERRORLEVEL
of zero (success) only if the files were correctly transferred. You can test for this in a batch file, using code such as this: Firestream 1 23.pscp sessionname:file localfile
, where sessionname
is replaced by the name of your saved session. -i
option. See section 3.8.3.18 for more information.