Help with Syncronizing

Advertisement

jpjohnson
Guest

Help with Syncronizing

We would like to


1. Sync ANY file or folder new or modified RECURSIVELY.
2. From Local to SFTP
3. Excluding thumbs.db (yes we can just have windows not create them but I would still like to know how to exclude a file)

Currently it is not syncing modified folder/files but rather everything
Currently it seems to only sync sub folders and contents through 8 directories fromm local.

We would like it to recurse through all sub directories. Yes these paths can be 10 to 20 directories deep.

Below is the code in the txt file winscp is following:

option batch continue
option confirm off
option synchdelete on
open WGDJobInfoSync
lcd \\servername\Company\Jobs
synchronize -filemask="*.db" remote "\\servername\Company\Jobs" "/TESTING/Jobs_TEMP"
exit

Reply with quote

Advertisement

techracer
Joined:
Posts:
5
Location:
ohio

synchronizing with filemasks to exclude files

I reviewed numerous posts and followed Site Admin Martin's advice but I cannot get the filemask to work to exclude files in the source tree when syncing. Here is what I added to my known-good script, and when this is added the script aborts with no visible error:

-filemask="|thumbs.db"

The script below shows what I am doing. This script works fine without that option. I placed z's in place of actual values to protect the confidential parts. I also tried

-filemask="|*.db"

in case you can't exclude a specific file, and also tried putting these strings before and after "remote" and nothing worked. I love WinSCP and would appreciate any help I can get because excluding files during a sync would be a really handy option to have.

"C:\1data\portableapps\WinSCP\WinSCPPortable\App\winscp\WinSCP.com" ^
/log="C:\1data\portableapps\WinSCP\WinSCPPortable\WinSCPlog_ts_master_documents_folder.log" /ini=nul ^
/command ^
"open sftp://zzzz:zzzz@zz.zzz.zzz.zz:zzzz/ -hostkey=""zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz""" ^
"lcd ""f:\""" ^
"cd /" ^
"synchronize -filemask="|thumbs.db" remote -delete ""F:\TS MASTER DOCUMENTS"" /""TS MASTER DOCUMENTS""" ^
"exit"

Reply with quote

techracer
Joined:
Posts:
5
Location:
ohio

Re: synchronizing with filemasks to exclude files

Thank you, Martin! Your reply was very quick and accurate. I tested the double quotes several times and it worked every time.

Thanks again!

Reply with quote

Advertisement

You can post new topics in this forum