Remote sync – filemask to exclude a subfolder
Hello,
I'm trying to use WinSCP (5.1.7 on Windows 7) to set up an automated deployment of a .NET app to an SFTP server (Windows-based shared hosting).
Using the great documentation I was able to get this working except for one part.
I'd like the deployment to ignore a subfolder (e.g.
I've tried to use the exclusion filemask in a dozen different ways but just cannot find the right formula – WinSCP still syncs the subfolder.
This is the command line I use:
Result (console output) is:
I'm trying to use WinSCP (5.1.7 on Windows 7) to set up an automated deployment of a .NET app to an SFTP server (Windows-based shared hosting).
Using the great documentation I was able to get this working except for one part.
I'd like the deployment to ignore a subfolder (e.g.
/App_Data/logs/
) and all files within.
I've tried to use the exclusion filemask in a dozen different ways but just cannot find the right formula – WinSCP still syncs the subfolder.
This is the command line I use:
winscp /command "option batch abort" "open sftp://login:pwd@server.com/ -hostkey=""ssh-rsa 2048 fingerprint""" "cd /web/content/" "lcd test" "ls" "lls" "synchronize remote -delete -nopermissions -transfer=binary -filemask=""|App_Data/logs/; App_Data/logs/*.*; App_Data/logs/*/*.*""" "close" "exit"
Comparing... ... Local 'C:\...\test\App_Data\logs' => Remote '/web/content/App_Data/logs' Synchronizing... Local 'C:\...\test\App_Data\logs' => Remote '/web/content/App_Data/logs' '/web/content/App_Data/logs/logs.txt' deleted C:\...\logs\logs2.txt | 0 KiB | 0.0 KiB/s | binary | 0%