Topic ""No differences found." in batch"

Author Message
kingroach
[View user's profile]

Joined: 2013-06-06
Posts: 2
Location: New Zealand
Hi all,

Got a scripting issue that I can't seem to find a solution to.

I have my batch WinSCP job scheduled to run hourly, which works great. The only problem I have is, upon it running and the folders already being 'in sync', it returns the notification box "No differences found." (OK / Help). The only way I can seem to kill the task is to set a timeout option in Windows Scheduler, but, the problem this causes is that it doesn't clear the job from memory (i.e. it still appears in Task Manager). By the time that this has run multiple times throughout the day where no differences were found, it accumulates numerous 'dead' jobs in memory.

My script looks like this, can anyone recommend a command that either closes this notification box or turns it off by default? I have tried using a 'close' and a '// switch' command, neither of which make any difference.

"....\WinSCP.exe"
"<username@<IP>"
/defaults /synchronize
"<SOURCE LOCATION>"
"<DESTINATION LOCATION>"
"exit"

Any suggestions would be appreciated.

Thanks.
kingroach
[View user's profile]

Joined: 2013-06-06
Posts: 2
Location: New Zealand
Still struggling to find an exact solution to this, but as a workaround I have included an ECHO command to create a file, thus when WinSCP run, there is ALWAYS some differences between the folders and the "No differences found." message never has any reason to be display.

The code I am using as a workaround is simply:

ECHO **************** DO NOT REMOVE THIS CODE **************** > <SOURCE LOCATION>\corruptor.txt
ECHO *** This file removes the notification that WinSCP *** >> <SOURCE LOCATION>\corruptor.txt
ECHO *** displays if no differences are found between the *** >> <SOURCE LOCATION>\corruptor.txt
ECHO *** source and destination folders. *** >> <SOURCE LOCATION>\corruptor.txt
ECHO *** *** >> <SOURCE LOCATION>\corruptor.txt
ECHO *** This allows the program to close and remove *** >> <SOURCE LOCATION>\corruptor.txt
ECHO *** remove itself from memory. *** >> <SOURCE LOCATION>\corruptor.txt
ECHO ********************************************************* >> <SOURCE LOCATION>\corruptor.txt
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
The /synchronize command-line option is not intended for automation.

Use synchronize scripting command instead:
https://winscp.net/eng/docs/scriptcommand_synchronize
https://winscp.net/eng/docs/guide_automation
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License