Post a reply

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

martin

Floatingshed wrote:

In SIMPLE language how do I exlude certain directories?

What did you try already? So that we can show you what did you wrong?
Floatingshed

Thanks, got it working now.

Next problem... my ftp server has 24 directories but I only want to synchronize 20 of them. I have read the documentation and once again it is not clear, the section on masks it utterly baffling. In SIMPLE language how do I exlude certain directories?

Thanks.
blackmagic88

martin wrote:

It copies material from the remote site to the local directory but doesn't delete obsolete local files. Anyone know why not?

You are missing -delete switch:
https://winscp.net/eng/docs/scriptcommand_synchronize


I'm using version 5.1.7 but when use
synchronize remote -delete "\\Server1\LocalDirectory" "/ServerDest/RemoteDirectory" it says too many parameter for command 'synchronize'.
Can you help me with this? many thanks in advance.
Guest

OK, thanks for the pointers. I've had some success with this script:

option batch abort

option confirm off
open ftp://username@remote site
synchronize local "d:\test winscp" "/test winscp" -mirror -criteria="none"


It copies material from the remote site to the local directory but doesn't delete obsolete local files. Anyone know why not?

Thanks.
Guest

I have read the documentation. It simply is not clear enough.
floatingshed

New to scripting...and stuck!

I regularly use winscp to synchronise two ftp folders manually, always with great success.
I thought it would be nice to do this automatically, scheduled by windows task scheduler.

The manual method I use is: Log-in and have both directories on screen. From the commands menu choose Synchronize. Select "local", "mirror" and nothing ticked in comparison data (I have my reasons!). This achieves the result I want every time.

I'd be most grateful if someone could give me a partial script as a starting point, or point me in the right direction to achieve the same result.

Many thanks.