SyncToy 2.0 does not return error code when one of sync operations fail RRS feed

  • Question

  • Hi guys,

    Recently i have been playing with the sync toy 2.0 and its a very cool tool but there is somethign which annoys me very much. Why does it not return any error code when one of the sync operations fail fully to execute ?

    Currently I have come up with a solution that sync me folders that is run as a batch in the system scheduler, when the operation to sync fails it suppose to send an email. See batch code for this:

    @echo off
    echo Synchronizing files...
    "C:\Program Files\SyncToy 2.0\SyncToyCmd.exe"/R "My sync job"
    if %ERRORLEVEL% NEQ 0 goto error
    goto done
    echo Sending error mail...
    SET SUBJECT="Sync tool failed !"
    SET CONTENT="Sync tool exited with error, please verify logs to see whats wrong."
    goto done

    for sending emails i use free command line tool:

    The main problem is that if you make on of the lines on "right side" read-only to sync job to generate an error and run the schedule task the even that there were some actions required the error code from sync toy is 0 which means more less that it didnt produce any error but it had some actions required so it did generate errors.

    Any ideas how to solve that ?
    (I'm talking only about the cmd line sync tool).
    Thursday, April 2, 2009 8:52 AM


All replies

  • I would really like to do this as well, please let me know if you find a solution
    Thank you very much for the tip on CMDLINEMAIL  I have been looking for something like it

    Friday, April 3, 2009 2:05 PM
  • Hi,

    Currently SyncToy returns an error code only if the sync action fails completely. If some files are "skipped" and not synced while rest of the files and folders are synced, SyncToy would return 0 for success.

    We have noted down this requirement for future release of SyncToy.

    Thanks for your feedback,
    • Proposed as answer by Sameer[MSFT] Friday, April 3, 2009 5:44 PM
    Friday, April 3, 2009 5:44 PM
  • Hi Sameer,

    Could you tell me when this new or updated version of Synctoy will be released?

    Monday, July 6, 2009 11:12 AM