1

I am using the PuTTY psftp get command to download files recursively from a remote Unix server to my local PC and I need to exclude the vendor subdirectory.

The vendor folder lives under /var/www/html/project/ together with other files and folders.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
rufusy
  • 107
  • 1
  • 10

1 Answers1

0

psftp does not have such functionality.


You would have to use another SFTP client. For example with WinSCP, you can use -filemask switch of its get command:

get -filemask=|vendor/ /remote/path/* C:\local\path\

There is also a guide for converting PSFTP script to WinSCP script.

(I'm the author of WinSCP)

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992