Topic "synchronize command doesn't with -delete option"

Author Message
eddzzz
[View user's profile]

Joined: 2010-03-11
Posts: 3
I would like to backup a directory to a server via the commandline. I got it working, but for some reason only without the delete option, which I really need.

What works is:
A: winscp.exe nbbackup /command "synchronize remote d:\nbbackup /nbbackup"

What does not work is:
B: winscp.exe nbbackup /command "synchronize remote d:\nbbackup /nbbackup -delete -mirror"

The second command doesn't work at all. It not only doesn't delete, but it also doesn't copy any files anymore.
What am I doeing wrong?

Thanks.

Last edited by eddzzz on 2010-03-12 09:05; edited 1 time in total
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
So what does it do? What's the output on the console?
_________________
Martin Prikryl
eddzzz
[View user's profile]

Joined: 2010-03-11
Posts: 3
There is no output to the screen when I enter command B, it just gives back a prompt.

Actually this is the same behaviour as when I enter command A, which also only gives back a promt. But then it does sync the two directories. Problem is that i need it to delete the removed files.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Run:
winscp.com nbbackup /command "synchronize remote d:\nbbackup /nbbackup -delete -mirror"
(note the .com extension)

Last edited by martin on 2010-12-25; edited 1 time in total
eddzzz
[View user's profile]

Joined: 2010-03-11
Posts: 3
Yesss!!! That's the trick. Now it works.

Thank you!
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