Examples of SCP2 transfers
- Last Updated: July 22, 2025
- 2 minute read
- WS_FTP Server
- Version 2022
- Documentation
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:]file2In this command line:
- machine-names (e.g. machine1, machine2) indicate the computer-name (and NOT the name of WS_FTP host).
usercan be any WS_FTP Server user.If the ‘username’ does not explicitly include a WS_FTP hostname, select WS_FTP Server packages will use the default hostname for authenticating the user.
For example, to connect to the default host of WS_FTP Server running on machine ‘MACHINE1’ with the credentials of USER1, use: USER1@MACHINE1 in the SCP command-line.
If the username explicitly includes the WS_FTP hostname (separated by current host separator character), select WS_FTP Server packages use the specified hostname for authenticating the user.
For example, if the current host separator character for WS_FTP server is *, then, to connect to the host HOST2 of WS_FTP 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 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 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 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 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:.