How to exclude certain directories on FTP transfer in WinSCP?
Found this little gem with full instructions:
To exclude directories in WinSCP open the application and do the following:
- From the
Login
window clickTools > Preferences...
; - In the
Preferences
window navigate toTransfer
section in the left side; - From the right side click
Add...
button; - In the
Add transfer settings preset
window, add a title for your preset in thePreset description
field; - Make sure that
Binary (archives, doc, ...)
is selected under theTransfer mode
section; - Under the
Other
section, at the end of theFile mask:
field, click theEdit...
button; - Add your files to exclude in the
Exclude files:
field, one per line; - Add your directories to exclude in the
Exclude directories:
field, one per line; - Click
OK
to close the window and to add the file masks; - In the
Edit transfer settings preset
, check theAutomatically select the preset when
from the top right and; - In the
Remote directory mask:
field add/
to make this preset load automatically on each host; - Now click
OK
andOK
to close thePreferences
windows; - Done. You can now login to your hosts and start transfering files and folders without worrying.
Exclude files:
.DS_Store
Thumbs.db
Desktop.ini
.ftpquota
*.log
Exclude directories:
.git
node_modules
.idea
.vscode
_notes
.well-known
cgi-bin
$RECYCLE.BIN
Have a nice day!