Synchronize script not properly working

Advertisement

Capric0rn
Joined:
Posts:
5
Location:
DO

Synchronize script not properly working

Hello,

I have a small script file to mirror changes in local drive (K:\). So far the used syntax is working except one but very important point:
No files are copied from local to remote! If a new directory is created on K:\ with files in it, the script will only create an empty new remote directory.

Here is my script:
option batch on
option confirm off
open sftp://username:pw@192.1xx.y.zzz
lcd k:\
cd /media/Backup/"Backup K"/
 
synchronize remote -mirror -criteria=time -rawtransfersettings ExcludeHiddenFiles=1 -delete -filemask=""|*/$RECYCLE.BIN/;*/"System Volume Information"/"" 
 
close
exit
What is wrong with my script? I hope somebody can help me here. Thank you in advance.

Martin

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,442
Location:
Prague, Czechia

Re: Synchronize script not properly working

First, try to fix the quotes in your script.
It should be like this: -filemask="|*/$RECYCLE.BIN/;*/System Volume Information/"

If that does not help, please attach a full session log file showing the problem (using the latest version of WinSCP).

To generate the session log file, use /log=C:\path\to\winscp.log command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Capric0rn
Joined:
Posts:
5
Location:
DO

Re: Synchronize script not properly working

Hi, Martin
that did it! Thank you very much for your quick response and your support...

Best regards,
Martin

Reply with quote

Advertisement

You can post new topics in this forum