After executing the script I examine the errorlevel var to see if everything is alright and noticed that errorlevel is set to 1 (or higher) when synchronize says "nothing to syncrhonize"
I think this is not correct, as the execution is done correctly, no errors occured. So errorlevel should be 0 in this situation.
winscp /console /script=WinScpPublishAM.txt /log="ftp%0.log" /parameter "%1" >> "%LogFile%" if errorlevel 1 set Errorsoccured=1
Winscp script: (Id info obscured)
option batch on option confirm off option transfer bin option exclude */ open -timeout=120 ftp://yyyyyyy:email@example.com cd htdocs/lccam cd "%1%" synchronize remote \\sngserver02\SNGProducts\LCCAMQM31\INTL -criteria=both close exit
Logging: (some info obscured)
batch on confirm off transfer binary exclude */ Connecting to www.sg-partners.nl ... Connected with www.sg-partners.nl. Waiting for welcome message... Connected Starting the session... Reading remote directory... Session started. Active session:  firstname.lastname@example.org Comparing... Local '\\sngserver02\SNGProducts\LCCAMQM31\INTL' => Remote '/31/beta' Nothing to synchronize. Session 'email@example.com' closed. No session.