Compare by content

From TotalcmdWiki
Revision as of 01:33, 20 February 2006 by Sheepdog (talk | contribs) (Compare by Content)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Compare By Content

You can find this function in the main menu "Files -> Compare by Content".

As the name tells this function compares two files by their content byte by byte.

If the files identical you get a message which contains the full path to both compared files.

IDENT.JPG

In the 32 bit version the differences are displayed in color in a dual list. In the 16 bit version only the result of the comparison is shown (same or different).

The two files are chosen as follows:

  • If more than one file is selected, the two first will be compared
  • If only one file is selected, it will be compared with the first selected file in the target window
  • If only one file is selected, and no file is selected in the target window, it will be compared with a file in the other window, having the same name (if it exists)
  • If no file is selected, the file under the cursor is compared with a file in the other window, having the same name
  • When there is neither a file selected in the target panel nor a matching filename found Total Commander takes the file that is selected/under Cursor and loads it to the Compare by Content Tool and let's you browse for the other.

When Total Commander does not choose the desired files you still may browse for some others.

Dialog box: Compare by content (32 bit version only)



With this dialog box you can compare two text or binary files with each other. To do this, please proceed as follows:

1. Select the two files you want to compare in Total Commander

2. Select Files - Compare by content

3. With "Next difference", you can jump to the next difference found between the two files

When you open the dialog box, Total Commander will execute step 3 automatically with the first two files selected in the active file panel. You can also always choose two other files for a new comparison and press the compare button.

Compare
Starts the comparison between the two chosen files. If the two files are identical, this will be shown with a dialog box only. Otherwise the differences will be shown in the two text windows. Binary files will be shown in hexadecimal mode, and text files in text mode. Files up to 2 MB will be loaded completely into memory, so the originals will remain editable. Larger files will only be mapped to memory, i.e. they remain locked during the comparison.
Next difference
Jumps to the next difference found. A continuous block of different lines will be regarded as ONE difference.
Previous difference
Jumps to the previous difference (backwards). This function is the reverse of the previous function.
Font
Chooses the font for the two list windows.
Search.jpg Start search for text in BOTH files simultaneously
Searchfo.jpg Continue search
Tile.jpg Show the two windows above each other
Case sensitive
If checked, two texts which only differ in case (uppercase/lowercase) will be considered as different. This is useful when comparing C source code.

If unchecked, texts which only differ in case are considered equal. This should be used e.g. for Pascal and Basic source code. This function has no effect on the comparison of binary files.

Binary
Compares in binary mode, i.e. fixed line width, hexadecimal display.
Unicode
Compares in unicode mode (UTF-16).

The dialog can be closed with ESC, ALT+F4 or the close button in the title bar. As with lister, multiple compare dialogs can stay open, and Total Commander can still be used!

Important note: In text compare mode, multiple consecutive white space characters or tabulators are treated as if they were one white space, e.g. "a       b" is the same as "a b".

If you don't want this, please add the following line to your wincmd.ini under section:

[Configuration]

CompareIgnoreRepSpace=0


shortcuts

The following shortcuts work in this window:

Insert select line
Ctrl+C, Ctrl+Insert Copy selected text
Shift+F10, Menu key Show context menu
Left/Right arrow Scroll by 1 character
Alt+Left/Right arrow Scroll by 30 characters
ESC Close dialog
F7 Search
F3 Continue search


Compare by content with FTP

Special considerations are found when trying to use the feature for FTP server connections (since 6.52).

  • "IBM MVS (Z/OS) Server considerations when using Compare by content"

Feature does not work with IBM MVS naming conventions. 501 Invalid data set name "0:'ABCD.EFGH'\XYZ". Use MVS Dsname conventions. will occur and can not be corrected. So you have to do a workaround like (F3 view) and compare the tempfile instead. Leaving sessions say - close Listerwindow - will delete the workfiles like implicit upload would do.




Back to Internal functions