DirSynch

A directory sinchronization tool.

Visit the DirSynch project page at GitHub.
Main Screen

How to use

Tipical usage

  1. Select the main directory.
  2. Select the second directory.
  3. Hit the "Load" button and wait for the file list to be filled.
  4. Analyse the list and uncheck the files you don't want to synchronize (you can use the Tools->Select menu or the toolbar).
  5. Hit the "Synchronize" button and wait until it finishes (a progress bar will be shown).
  6. If the operation is successful, when you click "OK" in the "Success" message window the list will be reloaded.

System requirements

Needed files

Files for this help

Optional files

Command line parameters

I use this to create specific icons on my desktop, for each dir I usually synchronize.
java[w] -jar DirSynch.jar [Params]
Params:
  -main [main dir path]           Set the main dir.
  -sec [sec dir path]             Set the secondary dir.
  -keep                           Keep backups.
  -prop [properties file path]    DirSynch.properties file path.
  --help | -help | -h | /?        Show this usage message.

Tools

Select
All
Select all files, except the equal ones.
None
Unselect all files.
Only YES/no
Select only the files that exists in one dir and not in the other.
Only in main dir
Select only the files that exists in the main dir and not in the second.
Only in sec dir
Select only the files that exists in the second dir and not in the main.
Newer in main
Select only the files that are newer in main dir than in the second.
Newer in sec
Select only the files that are newer in the second dir than in the main.
Sel/Unsel with regexp...
Let the user enter a regular expression (Java syntax) to select or unselect the files. This command does not change the selection status of the files that don't match.

Toolbar

[toolbar]

The toolbar has the following buttons:

  1. Select all
  2. Unselect all
  3. Select only in main dir
  4. Select only in sec dir
  5. Select newer in main dir
  6. Select newer in sec dir
  7. Select with regexp...
  8. Unselect with regexp...

Options

Include subdirs
If set, include all subdirectories, if not, ignore the subdirectories. Default: checked.
Use hash
If this option is set, the file comparison will be performed in the following way:
  1. Compare the files sizes.
  2. Calculate and compare the files MD5 hash, if the sizes are the same.
  3. Compare the files times, if the MD5 hashes are different.
If the option is unset, the file comparison will be performed in the following way:
  1. Compare the files times.
  2. Compare the files sizes, if the times are the same.
WARNING: Calculating hashes can be a very slow process! Use with care, specially if you're synching lots of files or large files.
Hide equals
If this option is set, the files considered equals are not shown in the list.
Keep backup
If this option is set, the destination files are copied with ".bak" extension before overwritting.
Synch times for same hashes
Sometimes files that are equals (having the exact same content -- and the same hash) have different times. If this option is set, these files will have only the times synchronized without being copied again. This option will slow a little the process, because the hash will be calculated for files with same size and different times.
Log options...
This option will show a dialog where you can: select the log file to be used, select the log level (from "none" to "debug" -- very verbose) and if the log file will have the new log messages appended to the end or if the file will be overwritten each time the program runs.
Load options...
Load the options (including the main and sec dirs) from a ".properties" file.
Save options...
Save the current options (including the main and sec dirs) to a ".properties" file.

The .nosynch file

To avoid synching some directory or file, just put it in a file (one per line) and save this file with the name ".nosynch" or "_nosynch". Note that if you don't want to synch this file, you also will need to put it on the list. The files listed in the nosynch file will not be shown in the list.

The file can be located in one of this places:

Notice that all files found in those places will be loaded and used to avoid synching. Currently the case must be the same (case sensitive).

All files and directories with the names listed will be skipped. For example: if you put "TEMP" in the _nosynch file and there are two directories with this name, in the main dir and inside a subdir "MyDir", both will be skipped and all its subdirs.

The nosynch files are read every time the list is loaded, so you can change it "on the fly", without closing the program.

Wildcards

The lines in the .nosynch file that starts with the character "|" (pipe) are processed as regular expressions. The syntax is the one from java.util.regex.Pattern class.

For example:

|.+\.zip
This line matches all files with the extension ".zip" (case ignored), so those files won't be synchronized.

Tips

When I create a .nosynch file, I put ".nosynch" in the first line, to avoid synching itself.

I usually also put a line with "|.+~", to avoid copying backup files created by Vim.

My third line (when in Windows) usually is "Thumbs.db", as they're protected files and cause errors when I try to synch them.

Known issues

If two files have the same times, but different sizes, they are marked as "BIG" (bigger) and "sml" (smaller). DirSynch ignores those files when synchronizing.

License

GPLv3 Free Software

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the GNU General Public License is distributed in this package as file named LICENSE. If you can't find this file, you can access the full license text in http://www.gnu.org/licenses/gpl-3.0.txt

Roadmap

To see the future plans, please access our issue tracker page.

History of versions:

v1.6.1 (23/07/2021):

v1.6 (10/09/2009):

v1.5.2 (28/05/2008):

v1.5.1 (21/05/2008):

v1.5 (17/05/2008):

v1.4.1 (31/01/2008):

v1.4 (26/01/2008):

v1.3 (13/01/2008):

v1.2 (30/11/2007):

v1.1 (28/11/2007):