"No differences found." in batch

Advertisement

kingroach
Joined:
Posts:
2
Location:
New Zealand

"No differences found." in batch

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.

Reply with quote

kingroach
Joined:
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

Reply with quote

Advertisement

You can post new topics in this forum