Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Elwood

may I suggest to add scripting examples?
I mean in docs/scriptcommand_synchronize, it gives only the command which is
synchronize both d:\www /home/martin/public_html

so it doesn't help to understand how this command should be used in the command line.
This is why I didn't understand about the quotes.

If you add such example, it would easier to get the idea:
WinSCP.com /command "synchronize both d:\www /home/martin/public_html" exit
Elwood

I was so focused on my mask that I didn't see the equal sign :-(
Thanks a lot Martin.

Have a nice day.
martin

Re: Can't exclude directories in command line

You are missing an equal sign. And you also have quotes wrong.
It should be:
"synchronize local . / -filemask=|mydir/"

If this does not help, please post session log file.
Elwood

Can't exclude directories in command line

Hi,

I really can't understand from the manual, how to exclude a directory. :-(
I'm using WinSCP 6.3.1.14821 on Win2022.

I have a FTP server containing:
/mydir

/mydir/myfile.txt
...

On my local machine, I cd into a directory and call the following to synchronize everything except mydir completely:
WinSCP.com ftp://user:password@ftp.domain.com  /command "synchronize local . /" -filemask "|mydir/" exit

It still downloads mydir, even if I use |/mydir/.
Even WinSCP dialog generates such filemask so what is the filemask I should use?

Output is:
Synchronizing...

Local '.' <= Remote '/'
mydir                  |            0 B |    0,0 KB/s | binary |   0%
other files...

Thanks.