Topic "Synchronize Remote"

Author Message
shimabuku
[View user's profile]

Joined: 2015-02-24
Posts: 1
Location: Hawaii
I have a question regarding Synchronize. Below is the command I use with Windows Task Scheduler.

/command "option batch abort" "option confirm off" "open sftp://test:password@192.168.20.92/" "synchronize remote -delete i:\payroll /home/it/payroll/" /log="c:\users\administrator\desktop\winscp logs\payroll.log" /loglevel=0 "exit"


I am confused on the delete switch. From the guide it states that it deletes obsolete files, does this mean if a file is deleted from local it will be deleted from remote also?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24993
Location: Prague, Czechia
shimabuku wrote:
From the guide it states that it deletes obsolete files, does this mean if a file is deleted from local it will be deleted from remote also?

That's correct.

Quote:
/command "option batch abort" "option confirm off" "open sftp://test:password@192.168.20.92/" "synchronize remote -delete i:\payroll /home/it/payroll/" /log="c:\users\administrator\desktop\winscp logs\payroll.log" /loglevel=0 "exit"

You have the command-line wrong. The exit never happens, it's used a host name instead (what would fail), as you have it after the /log and /loglevel switches, not after /command.

The correct syntax is:
/command "option batch abort" "option confirm off" "open sftp://test:password@192.168.20.92/" "synchronize remote -delete i:\payroll /home/it/payroll/" "exit" /log="c:\users\administrator\desktop\winscp logs\payroll.log" /loglevel=0
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