If you started PSFTP by double-clicking in the GUI, or just by typing psftp at the command line, you will need to open a connection to an SFTP server before you can issue any other commands (except help and quit).
To create a connection, type open host.name, or if you need to specify a user name as well you can type open user@host.name. You can optionally specify a port as well: open user@host.name 22.
Once you have issued this command, you will not be able to issue it again, even if the command fails (for example, if you mistype the host name or the connection times out). So if the connection is not opened successfully, PSFTP will terminate immediately.
6.2.4 The quit command: end your session
When you have finished your session, type the command quit to close the connection, terminate PSFTP and return to the command line (or just close the PSFTP console window if you started it from the GUI).
You can also use the bye and exit commands, which have exactly the same effect.
6.2.5 The close command: close your connection
If you just want to close the network connection but keep PSFTP running, you can use the close command. You can then use the open command to open a new connection.
6.2.6 The help command: get quick online help
If you type help, PSFTP will give a short list of the available commands.
If you type help with a command name - for example, help get - then PSFTP will give a short piece of help on that particular command.
6.2.7 The cd and pwd commands: changing the remote working directory
PSFTP maintains a notion of your ‘working directory’ on the server. This is the default directory that other commands will operate on. For example, if you type get filename.dat then PSFTP will look for filename.dat in your remote working directory on the server.
To change your remote working directory, use the cd command. If you don't provide an argument, cd will return you to your home directory on the server (more precisely, the remote directory you were in at the start of the connection).
To display your current remote working directory, type pwd.
6.2.8 The lcd and lpwd commands: changing the local working directory
As well as having a working directory on the remote server, PSFTP also has a working directory on your local machine (just like any other Windows process). This is the default local directory that other commands will operate on. For example, if you type get filename.dat then PSFTP will save the resulting file as filename.dat in your local working directory.
To change your local working directory, use the lcd command. To display your current local working directory, type lpwd.
6.2.9 The get command: fetch a file from the server
To download a file from the server and store it on your local PC, you use the get command.
In its simplest form, you just use this with a file name:
get myfile.dat
If you want to store the file locally under a different name, specify the local file name after the remote one:
get myfile.dat newname.dat