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

Re: Synchronize local with remote using the batch file

Please attach a full log file showing the problem.

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you may email it to me. You will find my address (if you log in) in my forum profile. Please include link back to this topic in your email. Also note in this topic that you have emailed the log.


Note that I'm pretty sure that this has nothing to do with WinSCP.
TK

Re: Synchronize local with remote using the batch file

Hello Prikryl
Thank you for the reply.

I tried scheduling it as a job in Windows scheduler, but it is throwing me the following error
"host does not exist"

Steps to generate the issue
1>Go to Start ->All Programs -> Accessories -> System Tools ->Task Scheduler

2>I went to the Actions tab -> Updated 'Program/script:' with '"C:\Program Files (x86)\WinSCP\WinSCP.exe"'
and 'Add arguments(optional)' As '/script="C:\Program Files (x86)\WinSCP\sync.txt"'

and the general settings are
When Running the task, use the following users account: (I used my own credentials windows network credentials, and my account has full admin permissions.)

Run with highest privileges check box is selected.

The code I have in 'sync.txt' is as follow::

option confirm off
option batch continue
open ftp://xxxx:yyyy@test.com
synchronize local "P:\aaa\bbb\ccc\" "/pppp/qqqq/"
exit

The Operating system in which I tried setting up the job is "Windows 7 Professional"

What is the cause for this error and what is the fix for this issue

Thank you for the support

martin wrote:

TK wrote:

a>Will Copy down the latest files from Remote to Local
b>Will Update the changed files to Local
c>Will delete the local files if the they are deleted on Remote?

Correct.

One more problem I am facing with synchronize local "E:\xxx\yyyy\zzzz\" "/yyyy/zzzz/", command is - Everytime when I execute the command it is trying to copy all the files, Even if the files already exists on the Local.
How can I eleminate this ?

Please read FAQ:
https://winscp.net/eng/docs/faq_synchronize

If that does not help, come back.
martin

Re: Synchronize local with remote using the batch file

TK wrote:

a>Will Copy down the latest files from Remote to Local
b>Will Update the changed files to Local
c>Will delete the local files if the they are deleted on Remote?

Correct.

One more problem I am facing with synchronize local "E:\xxx\yyyy\zzzz\" "/yyyy/zzzz/", command is - Everytime when I execute the command it is trying to copy all the files, Even if the files already exists on the Local.
How can I eleminate this ?

Please read FAQ:
https://winscp.net/eng/docs/faq_synchronize

If that does not help, come back.
TK

Re: Synchronize local with remote using the batch file

martin wrote:

synchronize local -delete ... ...

Please read documentation:
https://winscp.net/eng/docs/scriptcommand_synchronize



Hi,
Thank you for the reply
and can you help me understand better

So.. does it mean
synchronize local -delete "E:\xxx\yyyy\zzzz\" "/yyyy/zzzz/",


a>Will Copy down the latest files from Remote to Local
b>Will Update the changed files to Local
c>Will delete the local files if the they are deleted on Remote?

One more problem I am facing with synchronize local "E:\xxx\yyyy\zzzz\" "/yyyy/zzzz/", command is - Everytime when I execute the command it is trying to copy all the files, Even if the files already exists on the Local.
How can I eleminate this ?

Thank you for the support
TK

Synchronize local with remote using the batch file

Hi,
I have files in the ftp session and they get updated/changed from time to time using a 3rd party system.

I want to sync the local foler with the FTP path

I am using the following command

synchronize local "E:\xxx\yyyy\zzzz\" "/yyyy/zzzz/"

This is bringing down the files BUT if a files is delete from the FTP it is not deleting in the local

Bacially it is not Updating the local

How can I achieve that