back

4. Configuration via a configuration file

Synchronize can be configured via a XML config file. You can write this config file by hand - or use the GUI to create one. The program expects the path to this config file as an attribute when it is started. The config file starts with a XML prolog:

<?xml version="1.0" encoding="UTF-8"?>

Now follows the DTD (a DocumentTypeDefinition defines how a XML file should look; which elements and which attributes can be used. It has nothing to do with the configuration of Synchronize; it defines how a valid config file for Synchronize has to be defined):

<!DOCTYPE dirsync [

<!ELEMENT dirsync (directory*)>
<!ATTLIST dirsync logfile CDATA ''>
<!ATTLIST dirsync timestampwriteback (true|false) 'false'>
<!ATTLIST dirsync timestampdiff CDATA '0'>
<!ATTLIST dirsync skiplinks (true|false) 'false'>

<!ELEMENT directory EMPTY>
<!ATTLIST directory name CDATA #REQUIRED>
<!ATTLIST directory src CDATA #REQUIRED>
<!ATTLIST directory dst CDATA #REQUIRED>
<!ATTLIST directory withsubfolders (true|false) 'false'>
<!ATTLIST directory verify (true|false) 'false'>
<!ATTLIST directory include CDATA ''>
<!ATTLIST directory exclude CDATA ''>
<!ATTLIST directory dirinclude CDATA ''>
<!ATTLIST directory direxclude CDATA ''>
<!ATTLIST directory logfile CDATA ''>
<!ATTLIST directory copyall (true|false) 'false'>
<!ATTLIST directory copylarger (true|false) 'false'>
<!ATTLIST directory copymodified (true|false) 'false'>
<!ATTLIST directory copylargermodified (true|false) 'false'>
<!ATTLIST directory copynew (true|false) 'false'>
<!ATTLIST directory delfiles (true|false) 'false'>
<!ATTLIST directory deldirs (true|false) 'false'>
]>

As you can see from the DTD now follows one <synchronize> element containing none, one or more <directory> elements:

<synchronize
logfile="D:\Desktop\work\global.log"
timestampwriteback="false"
timestampdiff='0'
skiplinks="false"
>
<directory
name="Dokumentation"
src="L:\Desktop\Dateien\- Dokumentation"
dst="D:\Desktop\Dateien\- Dokumentation"
withsubfolders="true"
verify="false"
include="*"
exclude=""
dirinclude="*"
 direxclude=""
logfile="D:\Desktop\Dateien\getDokumentation.log"
copyall="false"
copynew="true"
copylarger="true"
copymodified="true"
copylargermodified="false"
delfiles="false"
deldirs="false"
/>
...
</synchronize>

4.1 "<synchronize>" Element

4.2 "<directory>" Elements

Now we can start with the single directories:

4.2.1 Paths

4.2.2 "What to synchronize" options

4.2.3 "How to synchronize" options

4.2.4 Delete options

back