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

passuff

Is there a way to run the script / winscp.exe in silent mode? I do not want to open a window every time winscp.exe is started...
passuff

I recognized that but I did not expect any difference between putting /synchronize and /script=sync.txt containing synchronize job.

I will try. Thx for your patience with me ;)
martin

There's nothing like your commandline in the
https://winscp.net/eng/docs/guide_automation
All the examples there (and in my post above) use commandline in a form of:
winscp.com /ini=nul /script=myscript.txt

With the script file containing scripting commands, like synchronize.
passuff

sorry. I followed these links. No idea what you are referring to. Any hint?
martin

No you didn't. Please follow the links in my previous post.
passuff

That's exactly what I did- at least I think so:
SET "log=WinSCP_Loop.log"
echo %date%-%time% starting WinSCP_upload > "%log%"
:loop
start /wait C:\WinSCP\WinSCP.exe "Session"  /defaults /synchronize
echo %date%-%time% restarting WinSCP >> ""%log%" "
goto loop

Unfortunately, I get those two messages I mentioned above...

BR
passuff

I found a way to script it by batch - unfortunately the sync session does not automatically close after finishing the job. I get the message "No differences found" if there are no differences which needs to be confirmed before the app terminates. This is really bad if you want to automate things. Is there a way to use sync jobs without prompting anything?

EDIT:
Additionally I get the following message from time to time and is not able to reconnect automatically... Seems /synchronize is not really good for automation...
passuff

OK then. Lets assume I just want to use synchronize job 24/7. Let me say it sometimes could take 3h to finish a sync job and sometimes 5s. So a syncing on a fixed schedule won't work. Is there a way to begin a new job as soon as the old one has finished? I tried it with Windows scheduler but it actually ignores running sync jobs, starts a new session and then everything crashes because of access violation...
martin

No, you should not run them in parallel. I've though you want to replace the "keep up to date" with the scheduled task.
passuff

But I have "keep remote directory up to date" running in the same folders 24/7. Can I still run the sync job in parallel? I would think this leads to conflicts on folder/file access or something like that and I need to end "keep remote directory up to date" before starting the sync job. But terminating "keep remote directory up to date" by schedule is not possible AFAIK.
passuff

But then I don't get why I can't edit the settings to compare by size for all. My scenario:

In my system AppXY produces corrupted files sometimes (locally) that are synced to a remote directory by "keep remote directory up to date". The local Appxy recognizes the corrupted file after a short time and repaires it. The only thing that changes is the file size. Unfortunately "keep remote directory up to date" does not recognize it.

Maybe I can do a Sync after 15min of "keep remote directory up to date". But Then I do need to use batch/scripts...
Any idea what I can do??
martin

The point of the "Synchronize on start" is to bring the folders to a state that the "Keep remote directory up to date" considers synchronized. It won't be, had the "Synchronize" used different criteria than the "Keep up to date".
passuff

Let me rephrase my issue...
When "Keep remote directory up to date" is started, it will do a synchronization run first:



Unfortunately this sync run does not take the global sync settings, where I configured file size:


How can I adjust the sync settings inside "Keep remote directory up to date" for file size?
martin

Re: "Keep remote directory up to date" does not sync files with different file size

The "Keep remote directory up to date" function uploads only newer files. It does not consider the sizes, nor does it upload files that are older than the remote ones.
passuff

These are the files I'm talking about.
Left side is locally and was edited. Upload to remote directory is not working with "Keep remote directory up to date"....
passuff

"Keep remote directory up to date" does not sync files with different file size

I'm syncing some folders with mentioned method but I don't get it to sync files with different file size. I can see the comparison in the log (xyz is modified comparing to remote file abc) but the file is not transferred.
I did not find any setting which activates the transfer based on different file size.
Anybody can support?