get - Download a file from the server to your local machine in SFTP

You can download a file from the remote server by "get" command.

psftp> get filename

Using get command you can only download a single file at a time.

SFTP expects local path and remote path from the user before downloading since it is a file transfer.
If user does not specify anything, the default paths will be taken automatically by PSFTP.

psftp> get

The above code will download the file from the default remote path (if exists) and put it in the local default path.

psftp> pwd
current remote working directory is /home/user1
psftp> cd /mine/files/level
new remote working directory is /mine/files/level
psftp> lpwd
current local working directory is C:\Documents and Settings\Desktop
psftp> lcd C:\folder1
new local working directory is C:\folder1
psftp> get

Since the remote and local paths are already defined, the above code will download the from /mine/files/level to C:\folder1