Examples of SCP2 transfers

The following examples show how you would use the PuTTY tool to transfer files using SCP.

Specifying the WS_FTP hostname on the SCP command line:

The syntax of (PuTTY) SCP command-line is:

pscp [-pqrvBC46] [-F ssh_config] [-S program] [-P port] [-c cipher] [-i identity_file] [-o ssh_option] [[user@]machine1:]file1 [...]

[[user@]machine2:]file2

In this command line:

For example, if the current host separator character for WS_FTP server is *, then, to connect to the host HOST2 of WS_FTP SSH server running on machine MACHINE2 with the credentials of USER2, use: USER2*HOST2@MACHINE2 in the SCP command-line.

Downloading files

Using the PSCP (PuTTY) SCP tool, to download the file a.txt to the current directory on the client machine from the home folder of User1 (of the default host) of WS_FTP Server with SSH running on Machine1 using the credentials of User1, use the following command:

PSCP.exe -P 22 -l User1 -pw password -2 -4 -scp User1@Machine1:./a.txt

To download the folder ‘MyDocuments’ (and all files/sub-folders underneath this folder) to the current directory on client machine from the home folder of User1 (of the default host) of WS_FTP Server with SSH running on Machine1 using the credentials of User1, use the following command:

PSCP.exe -r -P 22 -l User1 -pw password -2 -4 -scp User1@Machine1:./MyDocuments .

Uploading files

Using the PSCP (PuTTY) SCP tool, to upload the file a.txt from the current directory on the client machine to the home folder of User1 (of the default host) of WS_FTP Server with SSH running on Machine1 using the credentials of User1, use the following command:

PSCP.exe -P 22 -l User1 -pw password -2 -4 -scp a.txt User1@Machine1:.

To upload the folder ‘MyDocuments’ (and all files/sub-folders underneath this folder) from the current directory on client machine to the home folder of User1 (of the default host) of WS_FTP Server with SSH running on Machine1 using the credentials of User1, use the following command:

PSCP.exe -r -P 22 -l User1 -pw password -2 -4 -scp MyDocuments User1@Machine1:.

If you are uploading from a Unix system, remember that file names on the WS_FTP Server are not case sensitive, as it runs on Windows operating systems.