Topic ""No differences found." in batch"

Author Message
[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.

/defaults /synchronize

Any suggestions would be appreciated.

[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
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26890
Location: Prague, Czechia
The /synchronize command-line option is not intended for automation.

Use synchronize scripting command instead:
Martin Prikryl

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License