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

Nilks

Thanks @Martin – I have test and got it working :)
martin

I have already given you an example and link to documentation that details it.
Moreover your example is trivial, as the paths do not contains spaces, so no quotes are needed.
Though you have the arguments in wrong order. The local path must be the first.
https://winscp.net/eng/docs/scriptcommand_synchronize#syntax
"synchronize local C:\ /" "exit"

Had you needed the quotes, it would be:
"synchronize local ""C:\path with spaces"" ""/path with spaces""" "exit"
Nilks

@Martin I have tried but not working. Can you use my example of the simple command I typed and let me know how It should look. I will then test to see if that works then add correct path afterwards.

Example:
"synchronize local" "/" "C:\" "exit"
martin

@Nilks: I've written you above, that your have the quotes wrong. You have ignored that advice.
info_you85

Do you use a batch file who call the PARAM.txt (where you write your command synchronize)?
Nilks

I have tried a simple command
"synchronize local" "/" "C:\" "exit"

This is still copying files from REMOTE to syswow64 folder on local machine. But I haven't told it to do that.

This is the issue I am having. What ever location I put on local it still goes to SYSWOW64.

Any ideas?
nILKS

What command would I use for what is showing in the image above.

I want to copy every file from REMOTE (/) to LOCAL (user\.....) This would run every day in the morning hence using Task Scheduler.
info_you85

Hi,

Personaly I use a batch file for launch WinSCP with parameters like that:
C:\......\WinSCP.exe /ini=nul /script="C:\PARAM.txt" /log=C:\LOG\Winscp.log"

In this PARAM.txt is where I have the command line for tell to WinSCP what to do. For example:
synchronize remote "C:\TEST\" "/Remote/TEST" -delete -transfer=binary -criteria=size
Nilks

If you see attached it works when done through the APP. I want to run Task Scheduler and automate this. But When I try it is trying to upload Windows\system32 to remote side.

I need to copy files from REMOTE to Local.
martin

Re: Help with synchronize command

You didn't tell us what problems you have.
In any case, your commandline syntax is wrong.
It should be like
... "synchronize local ""C:\users..."" ..."

See https://winscp.net/eng/docs/commandline#syntax
Nilks

Help with synchronize command

Hi

I am trying to achieve a simple automation synchronize command. I want to copy all files from root of a remote server to local c:\folder but when I run the command through task scheduler it is trying to send c:\windows\system32 to the remote server.

If I run a manual sync from WinSCP app it works fine.

I have attached picture of command being used with redacted fields. Also I have tried putting / as the root after synchronize local command.