How do I make SyncToy back up while shutting down? RRS feed

  • Question

  • Hi all,

    I work for a company that requires us to shut our computers down every night.  I would like have SyncToy back up my files after I tell my computer to shut down so I don't forget to back up or waste any of my day doing so. 

    I am running Windows 7 and SyncToy 2.1.  I looked into using Windows Task Scheduler to schedule a SyncToy event, but I could not find time frame for after the computer is told to shut down and before it actually shuts down.

    This is the time frame I'm looking to auto-back up.  Any help is greatly appreciated!

    Wednesday, March 9, 2011 7:36 PM

All replies

  • A bit late reply bit maybe someone might find it handy.

    Create a simple backup.bat file and put in the following text:


    @echo off

    "C:\Windows\Program Files\SyncToy 2.1\SyncToyCmd.exe" -R


    then copy this batch file into C:\Windows\System32\GroupPolicy\User\Scripts\Logoff   (Note: You can activate it now just to test if it functions properly, check the SyncToy event log for errors).

    Click on Run and open gpedit.msc and navigate to User Configuration then Windows Settings then Logon/Logoff, click on Logoff and click Add and select the backup.bat script that you made previously.

    I hope that it work for you as it did for me.

    Note. I believe that you must have Windows 7 Professional or Ultimate to be able to use gpedit.msc (Group Policy) tool.





    Saturday, February 4, 2012 5:23 PM
  • This is too late for the original poster but I hope it helps others who are searching.

    1) Open notepad and copy in the following lines.

    call "C:\Program Files\SyncToy 2.1\SyncToyCmd.exe" -R
    call C:\Windows\System32\shutdown.exe -s -t 10


    2) save the file to the desktop as shutdown.bat - the file must be saved as a bat file.

    This will allow Synctoy to run until finished and then start the shutdown command.

    If you do not want to see the script running add @echo off as the 1st line



    Sunday, February 23, 2020 12:11 AM