Topic "Passing options to 'synchronize' command does not work?"

Author Message
dzekyl

Guest


I'm trying to synchronize directories from a script, deleting remote files that no longer exist locally. I use the following command from a script (executed by winscp407.exe /console /script=myscript)

synchronize remote -delete d:\backup\test /home/jakob/backup

However, WinSCP does not pick the -delete flag and instead reports

"Too many parameters for command 'synchronize'"

I've tried to insert the '-delete' option at different locations with no success. If I try simply

synchronize remote -delete

I get

"Comparing '-delete' with '/home/jakob'..."

i.e. '-delete' is interpreted as a directory name, not as a switch.

The same operation performed using the GUI works. Also, the script works if the '-delete' switch is not used.

I'm using the SFTP protocol and WinSCP 4.07 on Windows Vista 32-bit.

Is this a bug or am I doing something wrong?

Thanks,
dzekyl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Switch -delete is supported since 4.1 beta only.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License