locked
SyncToy 2.1 - Force Overwrite of New Files with Older Files RRS feed

  • Question

  • Is there a way to when using SyncToy to force a copy even if the files you are trying to copy from the Left side are older then the files on the Right side?

    Want to use SyncToy as a simple deployment and rollback tool for a few folders and I've set up 3 folder pairs.

    1st - Makes a copy of the target ( Right ) directory
    2nd - Copies updated files from source ( Left )  directory to target ( Right ) directory
    3rd - Copies original files back to the target directory

    My 3rd Pair does not work because the files are indeed time/date stamped eariler on the Left so they don't copy back to the Right.


    Thanks for any help you can provide.

    Ron Madaffari
    Thursday, February 18, 2010 7:28 PM

Answers

  • SyncToy itselft may not help you complete this, but if you could run some script before doing the sync, it is possible. As synctoy will recognize files property changes as update too, you can run a script to change files' readonly or some other property before you run sync.Then even the left side files' contents are older than right side, but the files are newer than right side, as they have latest modified datetime.


    Thanks,
    Ping


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Saturday, February 20, 2010 7:48 AM

All replies

  • SyncToy itselft may not help you complete this, but if you could run some script before doing the sync, it is possible. As synctoy will recognize files property changes as update too, you can run a script to change files' readonly or some other property before you run sync.Then even the left side files' contents are older than right side, but the files are newer than right side, as they have latest modified datetime.


    Thanks,
    Ping


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Saturday, February 20, 2010 7:48 AM
  • Hi - Use a "touch utility" for Windows that updates timestamps on all files. It will update the timestamp on all the files on the left side.

    Thanks
    Deepa


    Deepa ( Microsoft Sync Framework)
    Thursday, August 5, 2010 9:06 PM
  • That cannot be the solution. The 'touch' utility (if there is one for windows) will change the timestamp of the source and hence the destination will have all the files set to the same timestamp - we lose a valuable piece of information.

    The better solution would be to fix this deficiency in SyncToy - many of us want a 'true' one-way Sync - which means, "I don't care how the destination folder(right) looks like or how/when it was modified, but make it look exactly like my source(left)". Comparing file/folder timestamps should be a simple and 99% accurate way to detect differences which should immediately trigger a brute force overwrite from left to right for that file regardless of which timestamp is greater.

     

    • Proposed as answer by deemsocial Tuesday, January 4, 2011 8:05 PM
    • Edited by deemsocial Tuesday, January 4, 2011 8:26 PM Removed a non-working workaround that I thought seemed to work (Checking the 'check file contents' box)
    Tuesday, January 4, 2011 8:05 PM
  • I know this is an old post but the issue continues to arise.

    The best way I found to force SyncToy to copy all files without losing valuable file date information is to adjust the time of file creation by a fixed amount. I used "Bulk Rename Utility" it's free and a "go to" product for me. I add two seconds to the creation time which I don't see as a problem.

    Good luck

    Richard

    Thursday, February 15, 2018 2:50 PM