Synchronize Remote

Advertisement

shimabuku
Joined:
Posts:
1
Location:
Hawaii

Synchronize Remote

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?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,552
Location:
Prague, Czechia

Re: Synchronize Remote

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.

/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

Reply with quote

Advertisement

You can post new topics in this forum