user3727850
user3727850

Reputation: 143

How to copy entire folder and subfolder from remote sever to local machine using PuTTY psftp

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

Answers (2)

Martin Prikryl
Martin Prikryl

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

jbarnett
jbarnett

Reputation: 984

You can use scp. (example) scp -r user@remote:/path/to/folder /home/user/Desktop/

Upvotes: 9

Related Questions