Contacts

Bitwise comparison of files. Utilities for quickly comparing documents. How to compare files online

Often when working, you have to compare various modifications of documents, for example, the original and modified editions of materials prepared in Word or in the form of PDF documents or presentations, working and updated versions of price lists with changed prices in Excel, different versions text documents and so on. In this case, the question is not which version of the files is more recent (this is already clear from the properties of the files), but what is important is what exactly has changed in the documents in terms of content. Comparing documents manually is a thankless task because it takes too much time and the possibility of errors, because it’s easy not to notice some important detail when viewing. It is much more reasonable to delegate the task of comparing files to a computer. In general, in terms of comparing Word documents, everything is going quite well even without the use of auxiliary tools, although in versions Word 2002 and Word 2003 this opportunity it is reliably hidden from prying eyes, and probably not many users are even aware of its existence. The fact is that to compare documents here you must first download the source file. Then, from the Tools menu, open the Compare and Merge Corrections command, specify the file to compare with the original, and enable the Black Lines checkbox. Only after these manipulations will the “Merge” button turn into the “Compare” button, and when you click on this button, the program will compare the files.

The results of the comparison will be shown in the newly created document in traditional review mode. With the advent of Word 2007, everything has become much easier, since now you just need to switch to the "Review" tab, click on the "Compare" button and specify the versions of the document you are comparing. The result of the comparison will be presented in a new document, where the reviewed document will be displayed on the left, taking into account the changes, and on the right (one above the other) the original and changed documents. Theoretically, in Excel it is also possible to compare documents using built-in tools, however, only when working in the mode of recording changes. However, this is inconvenient, since each of the changed cells will have to be viewed by hovering the mouse over it, since changes made to the document are displayed in pop-up windows (about the same as regular notes).

Secondly, if the named mode is not first enabled (command "Tools" > "Corrections" > "Select corrections", checkbox "Track corrections"), then it will be impossible to compare XLS files.

As for quickly comparing PDF documents, this feature, of course, is available in Acrobat 9 Pro and Acrobat 9 Pro Extended, but these solutions are not installed on every computer. Therefore, if you need to quickly compare Excel tables, PDF documents, presentations, as well as documents in other formats, in particular, text files and program codes, you have to resort to using additional tools. There are many options here, and these can be either complex solutions that allow you to work with several file formats, or highly specialized utilities. A considerable part of such solutions are offered for decent money - for example, the price of one of the most famous complex solutions in this area, Diff Doc, is $99.95, and the Araxis Merge utility, which is very popular among programmers, is priced at €119. At the same time, there are also quite affordable or generally available on the market. free programs of a similar plan, it is precisely such solutions that we will evaluate in this article. In this case, we will focus on complex solutions, and from highly specialized tools we will note only utilities for quickly comparing Excel tables, since this is one of the most pressing tasks, and comparing Excel documents with complex solutions, although possible, is less effective than using highly specialized utilities .

⇡ Comprehensive solutions for quick comparison of documents

Compare Suite 7.0

Developer: AKS-Labs
Distribution size: 3.79 MB
Spreading: shareware Compare Suite - handy tool for quick comparison of text files, MS Office documents, RTF documents, PDF files, web pages (HTM), PowerPoint presentations, binary and some other types of files, as well as files in ZIP and RAR archives and on FTP servers. When comparing program listings in a number of programming languages ​​(Object Pascal, HTML, C/C++, JavaScript, PHP, etc.), syntax highlighting is provided. There is functionality for synchronizing text files and comparing folders with subfolders. The demo version of the program (available in Russian localization) is operational for 30 days and is fully functional. The commercial version costs $60. The technology for comparing files in Compare Suite is simple. First, select a method for comparing files, for which in the “Compare” menu you need to select one of the options: “character by character”, “word by word”, “by keywords". Classic character-by-character comparison is useful in situations where you need to record the slightest differences in the spelling of words - say, when comparing program listings. Word-by-word comparison of documents is usually used for comparison different versions the same file. Using the keyword comparison method, you can compare dissimilar documents even when word-by-word comparison is not possible.

After selecting the comparison method, in the “File” menu you need to select the “New file comparison” command and indicate the files to compare in the left and right panels. The program will analyze the files and highlight all existing differences (added, changed and deleted fragments) in different colors. Additionally, you can create a comparison report with detailed information about the files being compared (command "File" > "Report"). When comparing files other than text, you should keep in mind that their comparison in all complex solutions (both in Compare Suite and in other utilities) is carried out after conversion to text format. In practice, this means, for example, that if in the compared versions of a Word document the same word in a particular sentence appears on different lines, then it will be included in the list of changes. When comparing XLS documents, data from tables is extracted before analysis, and the differences found are displayed row by row in text format indicating the sheet name and column names, which allows you to navigate the data. The same scheme is used to compare PDF documents and PowerPoint presentations.

Friends, I am glad to welcome you to the pages of my blog. Today I want to tell you about 4 ways to compare files by content. The need to find differences arises quite often. You have to compare files by type or size. Comparing files in Word and Excel is also a very common procedure in offices and offices, where you constantly have to work with text documents and tables.

But for a webmaster or site owner, it is often necessary to compare two files based on content. And we are not talking about text files, although they are also analyzed in the same way, but about .html, .css, .php and so on formats. Those files where you need to find changes in the code. And sometimes changing just one sign can cause a lot of difficulties in achieving results.

So, the last example where I used a comparison of two files was a problem with the work of comments. I mentioned this in mine. The reason was just one space. Just imagine how you can find such an insignificant difference manually.

And, in general, when working with website files, you often have to analyze the code. Doing this manually is unrealistic. It’s much easier to use available tools, tools that every webmaster and website owner should have.

Method 1. Comparing files in Total Commander.

I have been using this program for a long time. For working with files, in my opinion, this is one of the best programs. Program Total Commander paid, but you can also use a trial version for 30 days, which will also work after the end of time, but with an offer to purchase. Download trial version Can .

Previously, I told you how to set up via TC, which allows you to easily manage site files and carry out all necessary operations directly from your computer, bypassing Personal Area hosting. This feature alone makes it worth using this program.

Now let’s look at a tool for comparing files by content, which also allows you to edit and copy data during the analysis process.

So, launch Total Commander - in one of the panels, select the first file for comparison - in the second panel, open the folder with the second file.

A new window will open, also divided into two panels. At the very top, in each panel there will be a time limit for selecting a file. In one of them, the first file will already be selected (but may be empty). To select a file you need to click on the small button with arrows (>>) .

After selecting files to compare, click on the button "Compare". The contents of the selected file will appear in each panel. Differences will be indicated by a background color.

To make changes to the file, just click on the button "Edit". And you can start making changes. The copy and rollback, search and encoding functions will also be available here.

If you have made changes to the file, then after closing the comparison window, you will be prompted to save the result.

Method 2. Comparing files in Notepad++.

If you have ever had to edit html files, css and php. You've probably heard about free editor Notepad++ code. You can download the program.

This is an excellent program, which, in addition to its innumerable advantages, also allows you to compare files according to their contents.

But this requires installing a small plugin. All this is done directly inside the editor itself.

So, launch the editor - go to the menu item "Plugins» "Plugin Manager""Show Plugin Manager".

In a new window, select the plugin « Compare" and press the button « Install".


After installing the plugin, you can start comparing the contents of files. To do this, you need to open two files - go to the menu item "Plugins"« Compare"« Compare (Alt+D)".

The result of the file comparison will be presented in separate panels. That is, the first file will be on the left, and the second on the right. Opposite the lines in which differences are found there will be a warning sign and highlighting in the background color.

The line where small differences are found will be highlighted in yellow and indicated with an exclamation mark.

A line that is completely different will be marked on one panel with a red minus and on the other with a green plus. And highlighted in the appropriate color.

Of course, once you find a difference, you can immediately make the necessary adjustments and save the changes.

You can complete the file comparison with a key combination Ctrl+Alt+D.

Method 3. Comparing the contents of two files in WinMerge.

This program allows you to compare not only the contents of files, but also the contents of entire folders. In this way it is similar to Total Commander, only the program is free. You can download it.

Installation of the program is standard and will not be difficult. Therefore, we will not dwell on this, but will immediately move on to the process of comparing two files.

After launching the program, you need to select files to compare. Open a menu item "File""Open".



The comparison result is presented in two panels, just like in the other examples. Only here the exact fragment of code that differs in a specific line is highlighted.

You can also edit files in this program. And when you close the comparison window, the program will offer to save the changes to the files.

Method 4: Compare files using the Windows command line.

This method allows you to compare the contents of files without third party programs. It is enough to use a standard tool operating system Windows.

Also, this method does not allow you to edit files. To do this you need to use other tools. But, nevertheless, you can cope with the task without additional programs.

To do this, open "Start""All programs""Standard""Command line". And enter this command:

Fc /N path to the first file path to the second file

it looks like this:

Fc /N C:\My Documents\file1.txt C:\My Documents\file2.txt

The finished result will look like this:


When there are few differences, they can be corrected quickly enough using editing programs. But when there are many differences, it is quite difficult to analyze information using this method.

So, I told you about ways to compare files, and now I suggest you watch the video tutorial, in which I show comparing two files in all ways.

I am sure that now if you need to compare files, you can easily do this using one of the proposed methods.

That’s all for today, I wish you all success and good mood and see you in new articles and video tutorials!

Best regards, Maxim Zaitsev.

Everyone knows that Word is a multifunctional text editor. Its many possibilities go far beyond the scope of this article. This article will tell you how to compare the two Word file in the program itself. This procedure is quite simple, but few people even know about it. It can be useful in different cases, for example, when there are two files on the computer: your work and its draft. In order not to make a mistake and not send a draft to the customer, it is best to use a comparison of two files.

Step 1: preparatory stage

It is noteworthy that after you compare two files, they will remain unchanged, and any discrepancies will be shown in another (new) document that will open automatically. But first things first. First, let's figure out what you need to do first before comparing two Word files.

The first thing you need to do is prepare. Before you can compare two Word files, you need to open them. So find them on your computer and double-click on them.

Now we need to open the tool we need in one of the files. It is located in the "Review" tab in the "Comparison" tool group. The tool is called “Compare”, so click on it and select the item of the same name from the drop-down menu.

So, you are there, now you can proceed directly to how to compare two Word files for differences or matches.

Step 2: selecting documents to compare

A window called “Compare Versions” is now open in front of you. As you can see, there are two areas in it: "Original Document" and "Changed Document". Accordingly, you should place the original document in the first, and its corrected version in the second.

To select a document, you need to click on the folder icon next to After clicking, an explorer will open in which you need to navigate to the file you are looking for. Once this is done, repeat the steps for the second file.

Now we have selected the necessary documents for comparison, but do not rush to click the “OK” button to begin the analysis process. In order to get the desired result, it would be better to set the necessary parameters. Let's talk about how to do this now.

Step 3: set the necessary parameters for comparison

So, before comparing two Word files, it would be wiser to set the parameters on which the analysis will be based. This will reveal the inconsistencies you want to find.

To open the options menu, you need to click on the "More" button, all in the same "Compare versions" window.

In the menu that expands, you can see a bunch of settings. Now let's turn our attention to the "Comparison Options" group. In it you need to select those elements that will be compared in two documents. By the way, the fewer checkboxes are checked, the faster the comparison process will go. Therefore, if you are looking for formatting changes, it would be wise to highlight only this item while leaving out the others.

In the "Show changes" group, choose what exactly to look for them in: characters or words. Also, do not forget to indicate in which document to show the result. In the source, modified file or new.

After you have set all the parameters you need, you can safely click the “OK” button to begin the analysis process. It does not last very long, even if all comparison points have been selected.

Step 4: Check the result

In the end they will show you the result. Depending on your choice, it will be demonstrated in one of two documents or in a new, third one.

Locations that do not match will be marked with a red line. Which is very convenient - by clicking on the line, you will be shown the difference. It will be crossed out with a red line.

By the way, if you didn’t know how to compare two Word files for matches, then, unfortunately, you won’t be able to do this in the program. However, special services can be used for this purpose.

Compare is one of the most useful plugins. And if you need to compare 2 files in Notepad++, compare is what you need.

In order to compare files in notepad++, let’s check if the plugin is installed. To do this, open the plugins tab. If it is not installed, go to the Plugin Manager: Plugins - Plugin Manager - Compare - Install. After installing the plugin, the editor will reboot.

In notepad++, comparing files is quite simple: open the two files that need to be compared, press Ctrl+Alt+1 or perform an action in the menu.

After this, we have three sections of the window: the first file, the second and the Compare NavBar in which differences in documents, if any, are graphically marked. Thus, we compared two files Notepad++ editor.

In notepad++, comparing two files turned out to be quite simple, as you can see, the notepad++ editor carries out a line-by-line comparison of files with highlighting of lines with different code. For me, as for many webmasters, this editor is the best.

Free solutions

Data synchronization requires programmers to system administrators both time and relevant skills. However, the correct selection of tools is no less important. Version control, working with projects, backup, merger and visual comparison files - far from it full list tasks related to synchronization in one way or another.

The guide includes 10 programs that can be called universal in many respects: they are not tied to a specific service or application, they allow you to perform the above (and less specialized) tasks not only through GUI, but also in the mode command line.

The comparison criteria are as follows:

  • Interface: support for display modes, saving sessions, customization options for toolbars and columns
  • Functionality text editor, working with source code
  • Merge and synchronization methods, three-way comparison capability
  • Export reports, create patches (diff)
  • Additional functions: integration with third party applications, support for extensions, protocols, etc.

SmartSynchronize

SmartSynchronize is a cross-platform program for comparing data, directory structures and their contents. In fact, the program is free for non-commercial use, however, a single-user license costs 39 USD.

Comparison modes are presented in the program's welcome window. In addition to the file selection dialog, you can view the history and select a saved profile. Also in the Preferences you can configure filters: file filters - to filter out files by name and extension, and directory filters - allow you to create a list of exceptions.

To compare files, a two-panel side-by-side mode is used with synchronous scrolling of the contents of both panels. There are few conventions in SmartSynchronize, but thanks to the linking lines, comparison and merge operations are very intuitive. SmartSynchronize specifies where and in what direction a section will be added from one file to another. Inserting text is done with one click, eliminating the need for a context menu.

Document encoding and syntax can be defined manually, syntax highlighting is provided for many programming and markup languages, line numbering and other editing functions inherent in integrated development environments (IDEs).

Overall, SmartSynchronize is highly customizable, but all settings are distributed across different sections of the menu, which takes some getting used to. There are not enough display modes or toolbar settings.

In the directory comparison mode, a list of files and the status for each of them is displayed; a preview is available at the bottom of the window. The comparison method - by content or only by size and time - is determined in the Edit → Preferences settings. The number of information columns (file type, date) cannot be increased, although existing ones can be disabled.

SmartSynchronize implements both one-way data merging with left or right sides, as well as regular synchronization. The configuration can be saved for later loading by taking a photo file structure. As the developers explain, the program does not recognize file attributes, so there is no point in using it as a backup utility. Working with archives is also not provided, as well as with remote directories.

In addition to the above, there is an additional, three-way merging method - 3-Way-Merge, which allows you to merge differences between multiple versions of files, with each of the three documents being editable independently of each other.

Comparison functions are undoubtedly in demand by programmers during version control. Therefore, in conclusion, it is worth referring to an alternative solution from the same company -. The program is a CVS client with integrated SmartSynchronize tools.

Summary. SmartSynchronize offers good tools for working with files and directories, which in some places cannot be customized and does not go beyond the basic capabilities.

[+] Three-way merger
[+] Convenient text editor
[−] Lack of documentation
[−] Inability to synchronize remote directories and archives

WinMerge

WinMerge is a program for comparing and merging files and directories in Windows. It can be used as a standalone tool or in conjunction with projects. WinMerge has a built-in text editor with support for programming languages, highlighting and line numbering.

There are two modes of working with data, combined into a dialog for selecting files and folders. When comparing, two types of filters are available: file filters and string filters. This allows you to use various add-ons and operate regular expressions, filtering out the necessary data types during comparison.

In file comparison mode, both files are displayed in the window, on the left and right sides. For easy navigation through the content, a map (“Locations”) is provided. Lines that have differences are marked in color and can also be viewed in the Differences panel. Basic merging operations are available in the Merge section.

The functionality of the text editor deserves special attention. Appearance amenable to modification. In addition to syntax highlighting and line numbering, work with scripts is provided, and functionality can be expanded through add-ons. Additions relate to the unpacker, viewer and script editor.

When comparing directories, the results are displayed in a tabulated list. It contains information about the name of the file (directory), its location, the result of the comparison, date, extension and other information. You can customize the display using columns. If necessary, you can activate recursive mode or switch to a tree view for easy navigation.

WinMerge allows you to perform the same tasks different ways- including using drag and drop or through the Explorer context menu. You can create projects for quick access to data and settings. WinMerge works in command line mode, and the program can also be used in conjunction with version control systems (TortoiseSVN, Visual Studio, Rational ClearCase, etc.).

Summary. WinMerge is a program primarily focused on working with projects. SVN integration, functional editor, filters and extensions - all this perfectly complements basic capabilities when comparing data.

[+] Support for extensions
[+] Functional editor
[+] Integration with third-party applications
[−] No three-way comparison

Meld

Meld is a cross-platform program (OS X, Linux, Windows) for synchronizing files and directories. With its help, both two- and three-way comparisons are carried out. First of all, the Meld toolkit will be useful to developers, since integration with version control systems is possible: Git, Bazaar, Mercurial, Subversion and others.

Despite supporting multiple platforms, the application is far from stable on Windows. For example, tabs and windows do not always open and close correctly. The problems may be related to the PyGTK library included in the installer. It was not possible to launch the program immediately and only as an administrator. Errors occur all the time, as evidenced by this.

When comparing files, you can use a text filter or search (regex syntax is supported). Syntax highlighting is provided (a library is used), line numbering, space counting and other options that need to be activated through the settings, since they are disabled by default. Insertions, changes and conflicts in the document are highlighted, you can quickly navigate through the list of changes and export in diff format. The connection between files can be easily tracked using connecting lines and the required sections can be merged with one click.

Scanning directory files is very slow. This is because the comparison is based on content rather than size and timestamp. The problem can be solved by checking the box next to the corresponding option in the settings. The set of available speakers is very limited: size, modification date and resolutions. Although you can use a file filter, browsing through a long list of files still becomes a routine process: You cannot instantly stop scanning, collapse the file tree, or quickly move to the desired elements.

Developers will be interested in the third operating mode of the application - Version Control View. Meld supports a command line interface, so it integrates with Git, Bazaar, Mercurial, Subversion and many others.

Summary. The Meld program has proven itself well in Linux environment, which cannot be said about functioning in Windows. Unstable operation and inconvenient interface, lack of sessions, insufficient configuration flexibility... On the other hand, the program's tools are not bad, and a high-quality adaptation of Meld for Windows is perhaps only a matter of time.

[+] Three-way comparison
[+] Support for version control systems
[−] Slow and unstable performance in Windows
[−] Inconvenient and uninformative interface

Diffuse

Diffuse is a cross-platform product for Windows, OS X, Linux and BSD, with an interface similar to Meld (based on the PyGTK library), but with functional differences. Integration with Bazaar, CVS, Darcs, Git, Mercurial, Monotone, RCS, Subversion and other environments is announced.

Continuing the comparison with Meld: Diffuse is characterized by stability, there are no sudden freezes. Detailed documentation is available, the interface has been translated into Russian. However, directory comparison is not included in the toolkit; the program only includes functions for comparing files and editing them. In Diffuse, you can find several merging modes: - two-, three- and multi-way. Thus, there can be any number of sources of comparison, the only question is speed and convenience. Regarding the second aspect, we can only say that there are no sessions here - accordingly, working with large projects in Diffuse is questionable.

Differences are marked in color, a Comparison Summary is available near the scroll bar, and buttons on the control panel are used to navigate through the list of changes. Line numbering and syntax highlighting with the ability to manually switch are enabled by default. Unlike other similar editors, in Diffuse you cannot immediately select an arbitrary section of text; to do this, you need to double-click on the content. Otherwise, you can select text and perform other actions only line by line.

Obviously, in Diffuse there are no differences between files, so merging lines is done in a less intuitive way. All available commands are collected in the “Merge” section, where you need to go every time if there are no commands in context menu. In SmartSynchronize or other mentioned solutions, many operations are performed in one click.

Working with version control systems is possible via the command line; a list of commands with descriptions is given in.

Summary. This kind of functionality is in demand when merging several text documents. The program does not have the disadvantages inherent in Diffuse's closest analogue - Meld. But, unfortunately, comparison of directories and reporting were left out.

[+] Convenient operation with strings
[+] CVS integration
[+] Multi-window merge
[−] No sessions
[−] Marking changes is not intuitive

Perforce P4 Merge

P4Merge is not often mentioned among other free products (for example, compared to WinMerge). In addition, it is not easy to find this program among other components of the Perforce complex. Perforce is a commercial cross-platform version control system with a wide range of applications, not least due to plugins and integration with various products (IntelliJ IDEA, Autodesk 3D Studio Max, Maya, Adobe Photoshop, Microsoft Office, Eclipse, emacs, etc.). However, P4 Merge can work autonomously from the Perforce server; just download the program from the developer’s website to use it for free.

The main operations are file comparison (Diff) and merging (Merge). The document editor is extremely simple: there is numbering, but no syntax highlighting. You cannot edit files in two panels on the fly; you need to select one of the panels, enable editing mode and then save the changes. The differences are marked, and navigation buttons are provided to navigate between them. The easiest way to navigate changes is using connecting lines. In general, the P4 Merge interface is not convenient enough: there is no summary of the differences, statistics on changes are presented as a summary figure, without detail, and to view the changes you need to use a manual update.

When listing other features of the program, it is worth mentioning image comparison. IN this mode two were discovered useful features: Highlights differences and merges two files into one. At the same time, it is not clear why the editor menu contains unused commands, such as changing encoding, comparison methods, and others that relate to comparing text files, but not images.

Summary. Of course, P4 Merge has many functional limitations, especially when compared to paid products. The application can be considered purely as an addition to the Perforce server. Perhaps, in search of the necessary tools, you should pay attention to other components available on the developer’s website.

[+] Merge diagram in Merge mode
[−] Poor functionality
[−] Inability to edit on the fly
[−] Lack of merge commands

Did you like the article? Share it