In order to specify files or directories to include and/or exclude from comparison and synchronization, you have to specify a so called regular expression, which is matched with the names of files and directories.
Note that the regular expression is not matched with the
complete path of a file or directory. For instance, if you have a
file called C:\Documents\Test\Test.txt
the
expression will only be matched with Test.txt
.
You may find an introduction to regular expressions in http://www.regular-expressions.info. The following list presents some typical examples for exclude and include patterns.
.*\.bak
will match all file names ending
with .bak
..*My Music.*
will match all file names
including the words My Music
.CVS
will match all file names exactly
matching the word CVS
.When using a JFS server, the default timeout is set to 5 seconds. Using a slow connection to the JFS server (e.g., via modem) may cause a lot of timeouts during synchronization. Therefore, you should increase the timeout (via the JFS server properties) to at least a minute (3.600.000 ms) before starting synchronization.
If you compare a lot of different files at once, it may happen that the Java virtual machine is out of memory. In this case, you should restart the program like:
java -Xmx256m -jar jfs.jar
The parameter -Xmx256
will increase the maximum
heap size to 256 MB. You may also add this parameter to one of the
starting scripts (e.g., JFileSync.bat
for
Windows systems).
JFS can be controlled via the command line.
Normally, the JFS command
line shell is started, when specifying the
-nogui
option. In this case, JFS performs an
interactive synchronization via the shell; that is, you can
have a look at the comparison table, specify synchronization
modes, answer questions about files that may not be
automatically synchronized, and so on. When using the
-quiet
option, every operation is performed in
background without user interaction. This means that files
that may not automatically be synchronized (e.g., because of
an inconsistent time stamp) will be skipped during
synchronization.
Assuming that you specified your directory pairs,
synchronization mode, and other profile settings in file
MyProfile.xml
the JFS call as part of a
synchronization script may look like follows:
java -jar jfs.jar -config MyProfile.xml -nogui
-quiet
Yes, it is. By default JFS uses the system defaults of your user. If the selected language and region of your user is not English US, which is the only currently supported language and region, some dialog elements that are provided by the Java Swing User Interface will be displayed according to the chosen system language and region. This holds, for instance, for the file chooser dialogs or the display of time stamps. You may change this behavior by specifying some Java properties when the application is started.
If you want a special locale (language and region), like de_DE (German, Germany), you may call JFS as follows:
java -Duser.language=de -Duser.region=DE -jar
jfs.jar
The parameter -Duser.language=de
will set the
used language for the Java virtual machine to de
and the parameter -Duser.region=DE
will set
the used region to DE
. You may also add this
parameter to one of the starting scripts (e.g.,
JFileSync.bat
for Windows systems).
Yes, you can. By default the system look and feels are used for each Java platform. You may specify a specific look and feel, like JGoodies Plastic XP (see jgoodies.com), as follows:
java -cp lib\jfs.jar;lib\looks-1.3.jar
jfs.JFileSync -laf
com.jgoodies.looks.plastic.PlasticXPLookAndFeel
The Java parameter -cp
lib\jfs.jar;lib\looks-1.3.jar
specified the
location of the JFS library and the JGoodies library
containing the look and feel you want to use. The JFS parameter
-laf
com.jgoodies.looks.plastic.PlasticXPLookAndFeel
specified the class in the JGoodies library that represents
the look and feel you want to use.
Please note that the look and feel class specified by the
-laf
option is stored in the JFS configuration
file (as part of the JFS configuration directory of your home
directory). So, you only have to call JFS for the first time
including the -laf
option. After the first
application start, you may use the following call in order to
start JFS with the previously chosen look and feel:
java -cp lib\jfs.jar;lib\looks-1.3.jar
jfs.JFileSync
You may also add this parameter to one of the starting scripts
(e.g., JFileSync.bat
for Windows
systems).
JFS has a quite simple internationalization mechanism. Let us assume, we want to add a German translation for JFS. You may add the new language for the command line and graphical user interface by following the following steps:
JFSTranslation.properties
in
directory src/jfs/resources/conf
to
JFSTranslations_de_DE.properties
in
order to get a template of all key words that have to be
translated.ant
in order to create a new JFS
build.java
-Duser.language=de -Duser.region=DE -jar
lib/jfs.jar
.You may also add translations for the help files and command line help text files by following the following steps:
JFSConfig.properties
in
directory src/jfs/resources/conf
to
JFSConfig_de_DE.properties
in order to
get a copy of the main configuration for the locale
(language and region) we want to add.src/jfs/resources
to the same directory
and add _de_DE
to the file name (before the
file extension), like:
JFSFAQ_de_DE.html
.JFSConfig_de_DE.properties
accordingly, so that the newly translated file is
referenced, like HELP_FAQ =
JFSFAQ_de_DE.html
. The mechanism is quite
general; you may even localize the used graphics.ant
in order to create a new JFS
build.java
-Duser.language=de -Duser.region=DE -jar
lib/jfs.jar
.