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.
psftp does not have such functionality.
You would have to use another SFTP client. For example with WinSCP, you can use
-filemaskswitch of itsgetcommand:There is also a guide for converting PSFTP script to WinSCP script.
(I'm the author of WinSCP)