Help with synchronize command

Advertisement

Nilks
Guest

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.

WINSCP COMMAND.png

Reply with quote

Advertisement

Nilks
Guest

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.

WINSCP COMMAND  2.png

Reply with quote

info_you85
Joined:
Posts:
8

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

Reply with quote

nILKS
Guest

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.

Reply with quote

Advertisement

Nilks
Guest

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?

Reply with quote

Advertisement

Nilks
Guest

@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"

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

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"

Reply with quote

Advertisement

You can post new topics in this forum