locked
Planning SyncToy 2.0 RRS feed

  • Question

  • Hi,

    I'm trying to plan(automatically run) SyncToy 2.0 to synchronise several files from 6 different users with the admin-account. I've already managed to install SyncToy and to run it by hand on the admin account, but now I want to run it automaticly on that one: Before logging in with any account, before signing out and before shutting down. 

    I've got a Windows XP-home SP3 and a Windows Vista SP2, with an external hard drive to copy the files to. 

    So like this:

    Desktop (XP) --------

    External drive (Z:/) - All connected to my router. 

    Laptop (Vista) -------

    How can I do this? Because in the Task Scheduler I can't find the option to plan the task before turning the computer off or before logging out. 

    Does anyone know how to use the Task Scheduler with SyncToy v2.0 or do I have to create a batch file (or adjust multiple), to run SyncToy v2.0 automatically when:

    - shutting down
    - signing on
    - signing off

     Both computers work with SyncToy v2.0, and I want to run SyncToy v2.0 on them automatically.

    -------------------------------------------------------------------------------------------------------------------------

    Here's what the help-file of SyncToy offers:

     

    Run SyncToy from a Command Line

    SyncToy can be run from the command line to provide support for scheduling or automating folder pair execution. The command line executable by default is located at: [System Drive]\Program Files\SyncToy 2.0\SyncToyCmd.exe.

    The parameters provided by this command line interface are described below:

    • -R Run all folder pairs that are marked as Active For Run All.
    • -R [Name] Run the named folder pair (only one folder pair can be specified).

    Usage Examples:

    • SyncToyCmd -R MyFolderPair
    • SyncToyCmd -R

    It is also possible to manage folder pairs from the command line. Folder pairs are managed through SyncToy.exe whereas scheduling is performed through SyncToyCmd.exe as described above.

    SyncToy does not support running multiple copies of SyncToy.exe at the same time. If SyncToy is already running in in the Task Bar, and a second instance of SyncToy.exe is launched with or without any command line parameters, it will simply bring the already running instance into focus and no errors will be reported.

    The parameters associated with SyncToy.exe are described below:

    • -d(left=, right=, name=,operation=Synchronize|Echo|Contribute, [check=yes|no], excluded=,included=) Creates a new folder pair with the specified options:
      • left - mandatory, provide absolute path for left folder
      • right - mandatory, provide absolute path for right folder
      • name - mandatory, provide name of folder pair
      • operation - mandatory, specifiy action type for this folder pair
      • check - optional, specify whether file contents should be checked for file matching, default is no
      • excluded - optional, specifies exclude filter for files, defaults to none
      • included - optional, specifies include filter for files, defaults to all
    • -u Delete one or more folder pairs, no user data will be deleted
    • -? Display Help

    Sample Usage:

    • SyncToy -d(left=e:\,right=c:\Pictures, name=MyPictures,operation=contribute)
    • SyncToy -uMyPictures

     

    • Edited by B0ries Friday, October 23, 2009 9:21 PM
    Friday, October 16, 2009 11:31 PM

All replies

  • Hi -

    Showing you how to write a batch file is outside the scope of this forum. I found this one link that seems pretty good at explaining how to - your other options are to bing for examples of other batch files or look to see if anyone else on this forum has shared out their examples.

    https://technet.microsoft.com/en-us/library/cc750054.aspx

    Thanks
    Deepa
    Deepa ( Microsoft Sync Framework)
    • Marked as answer by Deepa Choundappan Friday, October 16, 2009 11:59 PM
    • Unmarked as answer by B0ries Saturday, October 17, 2009 11:38 PM
    • Proposed as answer by Adrian Mustea - MSFT Tuesday, October 27, 2009 9:46 PM
    • Unproposed as answer by B0ries Monday, November 9, 2009 8:49 PM
    Friday, October 16, 2009 11:58 PM
  • I'm sorry, but I can't make the batch file with that information. It's just a simple text of how to see some options of cmd.exe, but not really the explanation of how to create the batch file I need right now.
    Tuesday, October 27, 2009 8:21 PM
  • Hey, B0ries,

    As Deepa mentioned above, it's not the scope of this forum to show HOW to write batch files.

    However, when you figure that out and have the script ready, I think Policy Editor tool can help you make a script run each time the machine boots up or shuts down. To launch it, just type gpedit.msc in the Run box.

    Then in the Local Computer Policy - Computer Configuration - Windows Settings - Scripts (Startup/Shutdown) you can add your script, and it will run (launch SyncToy) each time the machine boots up (or shuts down).

    Hope this helps.

    Adrian

    • Proposed as answer by Adrian Mustea - MSFT Tuesday, October 27, 2009 9:46 PM
    • Unproposed as answer by B0ries Monday, November 9, 2009 8:48 PM
    Tuesday, October 27, 2009 9:45 PM
  • That's the problem for my windows Vista, it's a home premium: it doesn't have gpedit.msc.
    In the Task Scheduler it works pretty fine, at start-up and at signing in of any account, but, after searching the options, I couldn't find the trigger to run the program before shutdown.

    I'll try to create my batch file and I'll see what will happens..
    Wednesday, October 28, 2009 2:33 PM
  • I've changed my mind.

    I've created the batch file for certain users, and put them into the startup map of each relative user.

    Synctoy will no run on the command line at log on, with the maps the user needs (so not all of them, but just the ones of him and in the public map).

    This works perfect, but now I need to do exact the same thing at logging off, but I don't know how to.

    The batch file is located in C:\Users\Berkelaar\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup and looks like:

    "C:\Program Files\Synctoy 2.0\Synctoycmd.exe" -R "Berkleaar Afbeeldingen"
    "C:\Program Files\Synctoy 2.0\Synctoycmd.exe" -R "Berkelaar Documenten"
    "C:\Program Files\Synctoy 2.0\Synctoycmd.exe" -R "Berkelaar Downloads"
    "C:\Program Files\Synctoy 2.0\Synctoycmd.exe" -R "Berkelaar Favorieten"
    "C:\Program Files\Synctoy 2.0\Synctoycmd.exe" -R "Berkelaar Muziek"
    "C:\Program Files\Synctoy 2.0\Synctoycmd.exe" -R "Berkelaar Video's"
    "C:\Program Files\Synctoy 2.0\Synctoycmd.exe" -R "Openbare Afbeeldingen"
    "C:\Program Files\Synctoy 2.0\Synctoycmd.exe" -R "Openbare Documenten"
    "C:\Program Files\Synctoy 2.0\Synctoycmd.exe" -R "Openbare Downloads"
    "C:\Program Files\Synctoy 2.0\Synctoycmd.exe" -R "Openbare Muziek"
    "C:\Program Files\Synctoy 2.0\Synctoycmd.exe" -R "Openbare Muziek Mijn Afspeellijsten"
    "C:\Program Files\Synctoy 2.0\Synctoycmd.exe" -R "Openbare Video's"
    exit

    Can I change the way the computer logs off? In the way that I change the log off file/button, so it runs this batch file first, and then logs off/ shuts down?
    Monday, November 9, 2009 8:47 PM