Reputation: 143
I am doing an automation to copy folder and subfolder from remote server to local machine i know the command to copy all the files inside folder
mget *.extension
But I want to know is there any command in psftp to copy folder and subfolder recursively to my local machine.
Upvotes: 2
Views: 39536
Reputation: 202393
To copy files recursively with the psftp
, use the get
or the mget
with the -r
(recurse) switch.
For example:
get -r /remote/path C:\local\path
See:
Or as @jbarnett suggested, you can use the SCP. PuTTY has an SCP client too, the pscp
:
pscp -r [email protected]:/remote/path C:\local\path
See https://the.earth.li/~sgtatham/putty/latest/htmldoc/Chapter5.html#pscp
Upvotes: 4
Reputation: 984
You can use scp. (example) scp -r user@remote:/path/to/folder /home/user/Desktop/
Upvotes: 9