synctool - Synchronize Multi-Devkit Directories


synctool.exe [-cfgxml <cfgpath>] [-n] <source> <target>


-cfgxml The command will be executed, and cafex returns immediately.
<source> Source folder.
<target> Target folder to sync to the source folder.
-n Print what will be performed but do not perform the action.


synctool synchronizes directories that are needed to allow Multi-Devkit (CAT-DEV or CAT-R) sessions to operate independently. synctool's operation is similar to that of Windows' xcopy command: it makes the "target" folder look just like the "source" folder. The difference from xcopy is that synctool attempts to save disk space, by creating hard links to files (instead of full copies) for some of the files in the "target" folder based on a "rules" file.

In regular SDK operation, no direct interaction with synctool is necessary as it is called by the cafe scripts or cafex as needed from a Multi-Devkit enabled window. However, if you need to use it directly for other purposes, its command line is explained below.

synctool creates any directories (including the target folder itself) that it finds in the source folder. During the sync, it will output its rules, a detailed log of the actions it is performing and a summary at the end with the elapsed time.

synctool relies upon the Microsoft .NET Framework 3.5 Client Profile. The standard edition of Windows 7 already includes .NET Framework 3.5.

Rules Files

synctool is a rules based folder synchronization utility. The default rules attempt to link as many files as possible to reduce the time needed to synchronize the folders and will remove any files in the target folder that are not in the source.

Default rules

Data $CAFE_ROOT/system/bin/tool/ Controls how the session data directory ($CAFE_ROOT/data) is synced to the default data directory.
Code $CAFE_ROOT/system/bin/tool/synctool.code.xml Controls how the code directory (where the RPX or ELF file is) is synced to the session specific code directory.

Custom rules


If the default rules are not adequate for a source folder, a user-defined file synctool.cfg.xml can be placed there to override the default one. It is best to start by copying one of the default files (code or data) and then edit it to meet your need. See XML File Directives for a list and usage of the synctool XML tags to control the sync process.

XML File Directives

The XML file contains directives on what and how to synchronize the directories. Each directive contains a regex pattern for matching any part of the source path. The path that the regex is matching on is relative to the source folder as given on the command line. synctool will never delete any files from the source directory.

XML Directives

XML TagApplied ToDescription
linkBothLink the target file to the source file.
copyBothCopy the source file to the target file.
ignoreSourceIgnore the source file. will not be copied or linked.
deleteTargetDelete the file in target even if it in the source folder.
preserveTargetPres eve the target file even if it is not in the source folder.
copy_if_olderTargetCopy the file from source to target only if the date/time stamps are newer than the target.


Basic example.

synctool.exe -cfgxml C:\SDK_ROOT\system\bin\tool\ C:\SDK_ROOT\data C:\SDK_ROOT\10x1x1x1_data

Linking any file ending in "aml".


Preserve devkit settings (already in the default rules file).


Ignore the synctool rules file in the source directory.


Revision History

2013/07/29 Updated overview.
2013/05/08 Automated cleanup pass.
2013/04/05 Initial version.