Dialog box: Synchronize directories
 
With this dialog box you can compare two directories including subdirectories with each other, and then copy the files with differences to the target directory, or any other directory. To do this, please proceed as follows:
 
1. Choose the two directories you want to compare, and (if necessary) the file types (wildcards), using the middle combobox. See Select Files how to include/exclude files by wildcards. Predefined filters aren't supported at this time.
2. Select the compare options "Subdirs", "by content" and/or "ignore date"
3. Press the "Compare" button
4. Under section "Show", choose the files to be shown
5. Select the files you want to copy. This is done by a click on the checkbox between the two comparison columns, or by selecting one of the options in the right click menu. By default, the function will select all newer files for copying. To reverse the copy selection, you need to double click on the arrow.
6. Click on "Synchronize". This will open a dialog box to copy the selected files. Only visible files will be copied!
 
Note: You can synchronize the following combinations:
- Two directories
- A directory and an archive
- Two archives (not all types by content)
- A local directory and a directory on an ftp server
- A local directory and a directory through the parallel port connection
- A local directory and a directory in a file system plugin
 
Here is a description of the dialog box elements:
 
Save directories and settings (optional) to wincmd.ini. The list is sorted by name. Cannot save FTP connections. "Only selected" will be stored in a separate list file - you will be asked for its name. Can be opened with F2.
 
*.* Wildcards to include/exclude certain file types. See Select Files how to include/exclude files by wildcards. Search filters are supported via button behind this box.
 
1x/2x etc. Button to choose compare mode when using regular expressions or saved search filters, where the results could differ on the left and right side. For example, a filter "maximum 14 days old" could match the file on the left but not the file on the right, if an old file was edited on the left but was unchanged on the right.
Meaning of the various options:
1x: Show files when the filter matches on at least one side.
2x: When the filter matches on both sides (dupes), or there is only one file (singles).
<-: The filter must match the file on the left. Do not show files only present on the right.
<+: The filter must match the file on the left. If there is only a file on the right, the filter must match that file.
->: The filter must match the file on the right. Do not show files only present on the left.
+>: The filter must match the file on the right. If there is only a file on the left, the filter must match that file.
! in front of one of the above: The option is inverted, do NOT show files which match the filter.
 
Compare Starts the comparison between the two chosen directories.
 
Only selected (in main window)
Only compares the directories and files, which are selected in Total Commander before invoking this function. It is sufficient to only select the directories/files in one window.
If you save this option, you will be asked for the name of a list file where the selected file names should be stored. When loading these settings, the name of the list file will be shown in place of the text '(in main window)'.
Empty directories Also synchronize empty directories, not just files:
1. In normal (symmetric) mode, directories missing on one side will be copied from the other side.
2. In asymmetric mode, directories missing on the left side will be deleted on the right side, and directories missing on the right will be copied from the left side.
 
Asymmetric If this option is checked, it is assumed that a copy of the left side should be created on the right side. Files which do not exist on the left side will be marked for deletion on the right side. This option is meant for backups. Do NOT use this option to synchronize a desktop and notebook!
Subdirs Also compares the subdirectories of the two chosen directories. A modification of this option makes a new comparison necessary.
by content Compares the content of files which have the same size and date. It checks that the files also have the same content. A modification of this option makes a new comparison necessary.
Compare by content via FTP is supported only when the server supports one of the following commands (and announces this via FEAT command): XCRC, XMD5, MD5, XSHA1. Total Commander then calculates the same checksum type locally as the server returns, and then compares the two.
When comparing two files from the file system (not from FTP or archives) a button is shown which allows you to choose content plugins for comparison:
[++] The plugin compare mode is activated
[>>] The plugin compare mode is inactive but can be used
The internal compare mode [=tc.compare as text] compares two files as plain text like in "Compare by content". Different types of line breaks (Windows, Unix, MacOS) will be ignored.
Multiple compare methods can be specified, e.g. [=plugin1.function1][=plugin2.function2]. They can be combined either with AND (all must match, default) or with OR (at least one must match, the search string must start with the | character).
ignore date If this option is selected, files with same size and name are considered identical. If additionally the option "by content" is selected, files with the same size are also compared by content. The result of such a comparison only yields to the result 'equal' or 'not equal' - the copy direction needs to be set by the user. A modification of this option makes a new comparison necessary.
 
Show: Options for the file display: These options become effective immediately, without a new search. A filter symbol and the number of hidden files is shown on the right side of the status bar if any of these options hides files.
 
Shows only files which by comparison need to be copied from left to right.
Shows only files which by comparison need to be copied from right to left, or (in asymmetric mode) which will be deleted on the right side.
Shows files which are considered equal with the current compare settings.
Shows files which appear as being different, but with no default copy direction (e.g. same date/time, or date/time ignored).
The above symbols also appear in the list of compared files, between the compared files. There are three additional symbols appearing in this list:
Appears only when comparing between an FTP server and a local directory. It means that the files are identical only if the remote file is a text file on a Unix server. For details, please read Synchronize dirs and FTP servers.
Only appears when comparing by contents, before the file pair has actually been compared.
The slashed circle is shown for files which are excluded from sync, e.g. for files which differ only in case like aa.txt and AA.txt.
 
duplicates Shows files which exist on both sides. An exclamation mark is displayed if the button is not pressed when opening Synchronize Directories to warn that files existing on both sides are hidden.
singles Shows files which exist on one side only. An exclamation mark is displayed if the button is not pressed when opening Synchronize Directories to warn that files only on one side will be hidden.
Note: If both buttons are up when closing the dialog (=no results are shown), they will be both down the next time the dialog is opened.
 
FTP time offset dt=..h
This option is only shown when comparing a local directory with a directory on the net.
It allows you to set the time zone difference between your location and the FTP server. Use numbers >0 if the server is to the west, and <0 if it is to the east of your location.
The offset is saved by server name, so if you have defined multiple connections to the same server, you need to set it only once in this dialog.
Note: If the command MLSD is used to get the file list, most servers will return the time stamps in UTC (universal time), which is independent from the time zone. In this case, the time zone difference must be set to zero!
 
mdtm Use the command MDTM <file date> to set the time stamp of uploaded files. Not all servers support this command. If available, one of the newer commands MFMT or SITE UTIME will be used instead.
 
utc Send the date/time in utc (universal time=Greenwich mean time). Most servers expect the time in UTC format, but some seem to use local time instead.
 
(1/100)  
subdirname Displays the subdirectory index counting from the top (0=base directory), the total number of subdirectories, and the subdirectory name. If the focused element is visible, its index and name are displayed, otherwise those of the top element.
With a righ/left mouse click it's possible to jump to the next/previous subdirectory.
 
Synchronize Opens a dialog box, with which the selected files can be copied to the other side, or to any other user-defined directory.
 
Close Closes the dialog box.
 
Name, Size, Date Click on the appropriate  header to sort by name, size, or date. If there is no file on the chosen side, the file from the other side is used for sorting.
 
<File list> Here the compared directories are shown, and (if chosen by the user) also their subdirectories. Each subdirectory is delimited by a gray bar. The symbol in the middle defines the copy direction, which can be chosen by the end user. The coloring of the text defines the default copy direction determined by the comparison:
Green: Copy from left to right
Blue: Copy from right to left, or delete on the right side (asymmetric mode, in this case, the file has a cross symbol in the middle).
Red: Files which are different by the given criteria (no copy direction)
Black: Files which are identical (no copy direction)
The copy direction can be chosen for multiple files at the same time with the right click menu. Furthermore, the right click menu allows you to display, delete or even compare individual files by content (can also be opened via double click). To compare two files that do not belong together (a single file on the left and one on the right), select them and choose "Compare left & right" from the context menu.
For ftp connections, there is an additional command 'Set local file date to remote date'. If you choose it, files with the same size will appear equal (they have the same size+date/time). The idea of this function is to make files look identical from which you know that they are identical (e.g. because you uploaded them using a different program). Concerning the date/time synchronizing problems with ftp, please read Synchronize dirs and FTP servers 
Files can be renamed with two clicks on the file name (not a double click), or with hotkey F6 (left file) or Shift+F6 (right file)
For normal files, there is a new option "Copy file properties", which allows you to copy just the time stamp, attributes and/or NTFS permissions of the selected files to the files in the other panel.
With Ctrl+PageDown(Up) it's possible to jump to the next (or previous) subdirectory.
 
Footer During the comparison phase, the footer shows the number of left+right directories visited.
While comparing by content, the already compared and total number of files to be compared are displayed, as well as the compared and total size and the progress percentage.
After the comparison ends, the following values are displayed:
Number of rows with files (same+different+single left+right)
Identical: Number of pairs of files that were recognized as equal
Different: Number of pairs of files that were recognized as being different
Unique left: Files that exist with this name only on the left side
Unique right: Files that exist with this name only on the right side
In square brackets: Total files found (left+right) and directories found/scanned