Windows compare text files

Windows 11 FC command to compare files

(Image credit: Mauro Huculak)

On Windows 11 (and 10), the File Compare (fc) is a command-line tool that comes part of the system, and it allows you to compare two similar files to determine how they changed over time. Usually, «fc» will be helpful for comparing simple text files, determining the changes made to a script, detecting if a file has been modified, and similar scenarios.

The tool can compare two similar files or the newest version against all the other files in the same location. Also, it includes options to examine the changes at the text level, or in Unicode, ASCII, or binary mode.

In this how-to guide, you will learn steps to use the tool to compare files with Command Prompt on Windows 11 as well as on Windows 10.

Recent updates

This guide has been updated to ensure the instructions are still accurate and reflect you can also use the tool on Windows 11.

How to compare files with the fc command on Windows 11

To compare files with the fc command tool, use these steps:

  1. Open Start.
  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
  3. Type the following command to browse to the folder with the files you want to compare and press Enter: cd PATH\TO\FILES

In the command, update the path with the location of the folder with the files to compare. This example navigates to the Downloads folder: cd C:\Users\USERACCOUNT\Downloads

  1. Type the following command to compare two similar files and press Enter: fc filename1.txt filename2.txt

In the command, replace filename1.txt and filename2.txt for the name of the files you want to compare.

fc compare files command

(Image credit: Mauro Huculak)
  1. Type the following command to compare two similar files in ASCII mode and press Enter: fc /L filename1.txt filename2.txt
  2. Type the following command to compare two files displaying only the first line that is different and press Enter: fc /a filename1.txt filename2.txt

fc compare two files showing first line

(Image credit: Mauro Huculak)
  1. Type the following command to compare two files in Unicode mode and press Enter: fc /u filename1.txt filename2.txt

fc compare two files in Unicode mode

(Image credit: Mauro Huculak)
  1. Type the following command to compare two files in binary mode and press Enter: fc /b filename1.txt filename2.txt

fc compare two files in binary mode

(Image credit: Mauro Huculak)
  1. Type the following command to compare all the files (*.txt) in the same folder to the new file (filename2.txt) and press Enter: fc *.txt filename2.txt

fc compare multiple files

(Image credit: Mauro Huculak)
  1. Type the following command to compare two files in different locations and press Enter: fc DRIVE:\PATH\TO\filename1.txt DRIVE:\PATH\TO\filename2.txt

In the command, replace DRIVE for the storage location drive letter and \PATH\TO\filename1.txt and \PATH\TO\filename2.txt with the path and name of the files you want to compare.This example compares two files in different folders: fc C:\Users\USERACCOUNT\Downloads\filename1.txt C:\Users\USERACCOUNT\Downloads\new\filename2.txt

All the latest news, reviews, and guides for Windows and Xbox diehards.

fc compare two files in different location

(Image credit: Mauro Huculak)
  1. Confirm the output to see the difference between the files.
  • Quick tip: You can view the list of options and more examples using the fc /? command.

Once you complete the steps, you will be able to see the difference between two similar files.

While the tool allows you to compare files, remember that this is a basic tool meant to be used with text files and extensions like .exe, .com, .sys, .obj, .lib, or .bin. You may be able to compare files like those from Microsoft Office or images, but you can only compare them at the binary level.

More resources

For more in-depth insights, troubleshooting tips, and the latest updates on Windows 11 and 10, be sure to explore these resources:

  • Windows 11 on Windows Central — All you need to know
  • Windows 10 on Windows Central — All you need to know

Mauro Huculak has been a Windows How-To Expert contributor for WindowsCentral.com for nearly a decade and has over 15 years of experience writing comprehensive guides. He also has an IT background and has achieved different professional certifications from Microsoft, Cisco, VMware, and CompTIA. He has been recognized as a Microsoft MVP for many years.

Home

Tips & Tricks

By

Deep Shrestha


6 Ways How to Compare Files on Your PC

Comparing two large files is impossible if you just see through their content. You can do this for files that have a couple of lines of content inside it. However, comparing two files with hundreds of lines side by side can be a hectic process.

One simple way to see if the two files are similar is by checking its file size. However, by doing this, you cannot compare the contents inside the file. This is where file comparing applications come in.

Whether you want to track changes made to a document or check documents for data loss, the file comparison application is the tool for you. Below in the article, we have listed a few ways to compare files. So without further delay, let us get right into it.

How to Compare Files?

Here, we have listed seven tools and applications you can use to compare two files. These tools follow a specific algorithm that compares the two files simultaneously. Once the comparison process is complete, it provides you with a detailed report on any found differences.

Now let us look at a few ways you can compare two files.

Using VS code

VS Code or Visual Studio Code is a free source code editor for Windows, Mac, and Linux. Although it is not a comparing application, there is a feature in VS code that lets you compare .txt files. You can compare any file that the VS code and read.

If VS code cannot read the file that you want to compare, you can also download an extension to read the file. Once VS code and read the file, you can compare them by following the steps below.

  1. Download VS code.
  2. Install and run the application.
  3. On the top of the window, click on File.
  4. Click on Open File. 
    open-file

  5. Browse and select the two files you want to compare.
  6. You can see the files that you opened on the left panel.
  7. Select the two files from the left panel by holding the shift key.
  8. Right-click on the file and select Compare selected.
    compare_files_using_VS_code

  9. The two files will now open side by side, highlighting the parts that are different from one another.

WinMerge

WinMerge is an open-source application that you can use to compare both files and folders. The application works just like the application mentioned above. You browse the two files you want to compare, and the application gives you a report highlighting changes between the two files.

One feature that WinMerge has that makes it stand out from its competitors is that it can compare three files simultaneously. Besides this, it can also compare image files. However, below we have only explained the process of comparing two files.

  1. Download WinMerge from their official website.
  2. Install and open the application.
  3. Press Ctrl + O to open browse menu. 
  4. Here, under 1st File or Folder, click on Browse and select the first file.
  5. Under 2nd File or Folder, click on Browse and select the second file. If you want, you can also browse the third file for comparison.
  6. Click on Compare.
    compare_file_winmerge

  7. Another tab should open, highlighting the difference between the two files.

Compare Files Using Metadata

Metadata refers to the properties of the file. These properties include file location, type, size, size on disk, created date, modified date, and last accessed data. Although you cannot compare the actual content inside the file, using the file size and its size on disk, you can check if the two files are the same.

To compare a file’s metadata,

  1. Right-click on the first file and click on properties.
  2. Again, right-click on the second file separately, and select Properties.
  3. In General tab, you can see the Size and Size on disk. Files that are the exact copy of one another will most likely have the same size.
  4. Go to the Details tab if you want to compare the file owner and attributes.

Using Notepad++

Similar to using VS Code to compare two files, Notepad++ also does the same thing. However, you will need to install a separate plugin to compare two files. However, the application cannot compare docs or image file.

Follow the steps mentioned below to compare files using Notepad++.

  1. Download Notepad from their official website.
  2. Install and run the application.
  3. Click on Plugins and select Plugins Admin.
    open-plugin-admin

  4. Type Compare and Click on Next.
  5. Check on the Compare plugin and click on Install. The application will now close and install the plugin.
    install-compare-plugin-notepad

  6. Once the installation process is complete, open the two file in Notepad++.
  7. Press Ctrl + Alt + C simultaneously. Both the files will now open side by side highlighting the changes in the two files.
    compare-two-file-in-notepad-1024x615

Using Command Line 

For Windows, the command fc lets you determine the changes between the two files. However, the command only lets you compare files in the same directory. If you want to know the differences between the two files, this is the method you want to follow.

  1. Copy and paste the two files into C drive.
  2. Press the Windows + R key to open Run.
  3. Type cmd and press enter to open Command Prompt.
  4. Type cd <File location path> and press Enter.
    Replace <File Location path> with the location of the two files. Example: cd C:\Program Files
  5. Type fc <filename1>.txt <filename2>.txt. Replace <filename1> and <filename2> with the two filenames. Example fc a.txt g.txt
  6. Press Enter. 
  7. The Command Prompt will now display the differences in both files. 

Compare Microsoft Word Files

If you have files in Microsoft Word that you want to compare, you can use its built-in feature to compare the two docs files. Microsoft Word compares the two files and creates a new word document, giving you a detailed report.

To compare word files,

  1. Open any one of the Docx files. 
  2. Go to the Review tab.
  3. Click on the drop-down menu on Compare and select Compare.
  4. Under Original document, click on the folder icon and select one of the files you want to compare.
  5. Under the Revised document, click on the folder icon and select the second file.
    compare_doc_file

  6. Click on OK.
  7. A new word document will open, giving you a detailed report highlighting the differences.

This article talks about the best offline and online text comparison tools for you to compare your documents accurately, effectively, and efficiently.

No writer writes articles in one go. Writing an article and presenting it to the audience involves numerous edits, making the final version a lot different from the original one. It often becomes difficult to compare and contrast the content (text) in the original and edited articles. Do you also find yourself stuck in a similar situation? If yes, here are the best text comparison tools to your rescue.

The text difference checker compares two text files and helps you identify the differences when a document has multiple versions. Moreover, it also helps spot the changes when two individuals work on the same document.

However, there are a lot of online text compare tools, making it challenging to choose the one that fits all requirements. Hence, we did all the hard work of diving into the pool of such tools, comparing them, and listing the best ones.

Let us share the best text difference checkers in the following section without wasting your precious time beating around the bush.

Best Text Comparison Tools (Free to Use) in 2024

The following are our top picks for the best offline and online text comparison tools.

1. Draftable

Draftable

Let us first introduce you to Draftable. It is among the best tools to compare text files online for its pleasant interface, API access, highlight and description of changes in the documents, and a lot of other features.

The following are some features of this software that are responsible for making it one of the best online text comparators.

Key Features of Draftable

  • Comparison of different file formats like PDF, .txt, .docx, and more
  • Single and side-by-side view of document differences
  • Lists all the required changes
  • Lets you change fonts and text styles

Click here for more information

Also Read: Best Free Textbook PDF Websites to Download Books Online


2. Meld

Meld

Here comes Meld. It is yet another best open-source text difference checker. This software makes text comparison easier with its colored marking of differences and other fascinating features.

Some interesting features of Meld include the simultaneous comparison of three files and the following.

Key Features of Meld

  • Easy file compare, edit, and merge
  • Seamless navigation between changes
  • Text filtering allows you to ignore irrelevant differences
  • Three-way merge assistance with base version display and conflict handling
  • Effortless folder comparison with a detailed view of differences

Click here for more information


3. Diffuse

Diffuse

Let us now look at Diffuse. It is one of the best text comparison tools for its line-matching tool for the side-by-side comparison of your documents, easy text editing, and document merge.

Moreover, it also boasts some amazing features that we share below.

Key Features of Diffuse

  • In-built version control for easy revisions
  • Support for different repositories for version tracking
  • Availability of syntax highlighting
  • Supports keyboard shortcuts for seamless navigation
  • An open-source text difference checker

Click here for more information

Also Read: Best Free Document Scanner Software for Windows 10


4. WinMerge

WinMerge

Next, we have WinMerge on our list of the best tools to compare two text files. With this tool, you can compare three files simultaneously, edit, and merge your documents.

Moreover, highlighting differences for easy comparison and the following factors contribute to making WinMerge one of the best tools for text comparison.

Key Features of WinMerge

  • Support for a wide range of file formats
  • Plugin support
  • Detects moved lines
  • Location pane with a map of files compared
  • Easy folder comparison with regular expression-based filters, a tree-style view, etc.
  • Lets you compare tables and images as well

Click here for more information


5. KDiff3

KDiff3

Let us now take a look at KDiff3. It is yet another open-source tool where you can upload texts and compare them. We think it is among the best text difference checkers for its Unicode support, version control to view and merge various versions, and other useful features.

A few of the fascinating features of this software include three simultaneous comparisons and the following.

Key Features of KDiff3

  • Easy-to-use and intuitive software
  • Customizable interface
  • Many essential features like plugins, Windows Explorer integration, and more

Click here for more information

Also Read: Best PDF Search Engine Sites to Get Free PDF eBooks


6. Litera Compare

Litera Compare

Here comes Workshare Compare. As the developers claim, it makes a total comparison of multiple document types. You can use this software to detect changes across two documents accurately and instantly.

Comparison within Outlook/directly within PDF files, sharing capabilities, detection of changes on the fly, and the following features make Litera Compare one of the best text comparison tools.

Key Features of Litera Compare

  • Comparison of tables, comments, charts, OCR, embedded images/objects, and other elements
  • API access and server-side document comparison
  • Easy to understand and holistic analysis of all changed elements of your document

Click here for more information


7. Adobe Acrobat Pro DC

Adobe Acrobat Pro DC

Last but definitely not least, we have Adobe Acrobat Pro DC to complete our list of the best text difference checkers. It is among the most widely used tools as it helps compare PDF files effortlessly.

Moreover, it makes side-by-side comparisons, highlights changes, and offers the following delightful features, making it one of the best software to compare two text files.

Key Features of Adobe Acrobat Pro DC

  • Creation and editing of PDF files
  • Conversion of PDF from one format to another
  • Text recognition and PDF signing ability
  • Easy-to-understand interface

Click here for more information


8. AptDiff

AptDiff

The next name on this list of the best free text comparison tools in 2024 is AptDiff. If you want to compare the text on your Windows XP or Windows 2007 device, then this tool is the perfect one for you.

The interface of the software is a little outdated and even the software is available for comparatively older Windows versions as well.

Key Features of AptDiff

  • Supports various PDF, .txt, .docx, and forms of documents
  • Side-by-side or pane-by-pane comparison.
  • Marks all the similarities feasibly
  • Beginner-friendly user interface
  • Click here for more information

Click here for more information


9. Araxis

The Araxis tool is now available. It performs a comprehensive comparison of a variety of document kinds, as the engineers who developed it say. By using this program, you will be able to correctly and rapidly identify changes that have occurred across two documents.

Key Features of Araxis

  • Simple to comprehend and comprehensive examination of all the components of your text that have been modified
  • A comparison of documents on the server side and access to the API
  • Some of the features that make Araxis one of the finest text comparison tools include the ability to compare documents directly inside PDF files or within Outlook,
  • The ability to share documents, the ability to detect changes on the fly, and more.
  • Table comparisons, comments, chart comparisons, optical character recognition (OCR), embedded pictures and objects, and other aspects
  • Comparing the Key Characteristics of Litera

Click here for more information

Also Read: Best Free PDF Split and Merge Software


Summing Up the Best Text Comparison Tools

This article discussed the best text difference checkers you can use to compare three/ two different text files. You go through each of these programs to choose the one that fits your requirements the most.

If you think any other free text comparison tool also deserves to be on this list or have any other suggestions/questions about this article, please drop them in the comments.

Comparing bodies of text is not something most folks would want to do, ever. However, wouldn’t it be great to have a tool that makes life easier for those who do this regularly? We agree, and we’re going to talk about one of those tools today. OK, so the tool we will be reviewing today is no other than Text Comparator. From our testing, it’s pretty good, and although the features are not impressive, they are good enough for most use cases.

We should point out that this is a portable program, so there’s nothing to install. Furthermore, it doesn’t take up a lot of resources when in use, and that’s great for those running it on lower-end devices. Not to mention, the main screen is bland, and while some might find that to be a problem, we do not. You see, being bland means less distraction, and since this is a text compare app, there’s no need for many things on the main section.

How to use Text Comparator on Windows 11/10

When it comes down to comparing bodies of text, this task is not always easy to do, but with the right tool, such as Text Comparator, it becomes a breeze. The process involved is as follows:

  1. Compare text
  2. Compare info
  3. Unmatched document

1] Compare text

Compare two Text files with Text Comparator

When it comes down to comparing texts, this can be accomplished with relative ease. You see, there are two text boxes for users to paste. Copy the preferred text body and paste them in their respective areas.

The tool takes no time to compare texts, but it all depends on the amount of text and the speed of your computer. The good news is an internet connection is not required. Therefore, it will work at any time and anywhere.

2] Compare info

Remember that once the user has filled both text boxes with text, the tool will show information based on what it has found. Under each box, then, the user will see the words “Click Here.” Click on that word to open a new window, and it should show information about the text in the respective box.

Mind you, It won’t show much, but enough to get the idea across. And that’s good because things are kept simple.

3] Unmatched document

If your texts do not match, you’ll wonder what the causes are and what to do next. In order to know what to do next, you’ll need to learn the cause; for this to happen, the user must click on the words Un-Match to get all the necessary data.

It doesn’t deliver much data, but what it shows should be a good amount of information to get folks on their way to fixing what needs to be rectified.

Conclusion

Overall, we like what Text Comparator brings, even though it’s straightforward. But you know what? Simple is the way to go with these tools, so we’re fully onboard, and you should too. Download the Text Comparator tool directly from here.

Does Windows have a file comparison tool?

The built-in Windows command-line tool “fc” lets users compare two similar files and track their changes over time. It is beneficial for comparing basic text files, identifying script alterations, detecting file modifications, and handling related scenarios.

How do I use Notepad++ to compare 2 files?

By employing the Compare Plugin, you can initiate the file comparison process. To begin, open two desired files in Notepad++. Next, access the Plugins menu and choose “Compare” followed by “Compare.” it will reveal discrepancies between the two files, marking any alterations in red.

Содержание статьи:

  • Нюансы: о каких файлах идет речь
    • Текстовые файлы
    • Документы Word / Excel (+ текстовые в т.ч.)
    • Др. бинарные файлы Exe, Com и пр. (возможно без расширения)
    • Картинки
  • Вопросы и ответы: 0

Приветствую всех читателей!

Сегодняшняя заметка будет относиться к офисной тематике… (а точнее: речь пойдет о сравнении нескольких документов между собой).

Представьте, у вас есть парочка документов, в которых частично различается текст (например, где-то уже исправленный, а где-то «старый», с ошибками…). И теперь нужно найти между ними различия, принять их к сведению, и собрать из 2-х файлов один.

Можно, конечно, сориентироваться по дате — однако, далеко не всегда такой подход будет уместен. Но вот если бы какая-то программа нашла и выделила несовпадающие символы (строки)… это было бы здорово! 👌

Собственно, о нескольких подобных примерах и пойдет речь в этой заметке.

*

Нюансы: о каких файлах идет речь

Текстовые файлы

И так, начать заметку (я думаю) стоит с самых обычных текстовых файлов (коих большинство). Задача перед нами будет следующая: есть два почти одинаковых текстовых файла (в формате TXT), и нужно найти в них отличные строки и символы, и подсветить их (о чем я и сказал выше).

Для работы нам понадобится блокнот 👉 Notepad++ (ссылка на офиц. сайт). Установка у программы стандартная (поэтому ее опускаю).

Далее делаем следующее:

  1. запускаем Notepad++ и открываем меню «Плагины / управление плагинами» — в списке плагинов находим «Compare» и соглашаемся на его установку (см. пример ниже 👇);

    Устанавливаем плагин в Notepad++

    Устанавливаем плагин в Notepad++

  2. затем открываем в программе два текстовых файла, которые нужно сравнить (стрелочка 1 на скрине ниже 👇). Далее переходим в меню «Плагины / Compare / Compare» (или нажимаем сочетание Ctrl+Alt+C);

    Открываем два нужных файла и жмем кнопку сравнения

    Открываем два нужных файла и жмем кнопку сравнения

  3. в результате Notepad++ сравнивает построчно файлы и выделяет все различия: как в строках, так ив конкретных символах (даже, если разница всего в одну запятую или точку!). См. мои файлы ниже. 👇

    Места, где есть различия, были выделены!

    Места, где есть различия, были выделены! // Notepad++

*

Документы Word / Excel (+ текстовые в т.ч.)

Начну с MS Word…

Программа универсальная и позволяет сравнивать как документы формата Docx, так и обычные текстовые файлы (TXT, RTF и пр. форматы).

*

Делается это так (на примере Word 2019):

  1. сначала необходимо открыть оба файла в Word (как правило достаточно по нужному файла кликнуть правой кнопкой мыши и в меню указать, что требуется открыть в Word, см. пример ниже 👇);

    Открываем 2 файла в Word

    Открываем 2 файла в Word

  2. после необходимо перейти во вкладку «Рецензирование» и кликнуть по инструменту «Сравнить / сравнить 2 версии документа» (пример ниже 👇);

    Рецензирование - Сравнить (Word 2019)

    Рецензирование — Сравнить (Word 2019)

  3. далее Word попросит указать эти два документа — просто выбираем из списка исходный документ и измененный;

    Выбор документов

    Выбор документов

  4. в итоге эти документы будут автоматически проанализированы и все отличия выведены на экран (кстати, Word автоматически покажет все исправления!). 👇

    Что получается в итоге

    Что получается в итоге // Word подсчитал сколько было мест с исправлениями (в моем случае 8!).

*

👉 Что касается Excel

Ох-хо-хо, здесь все не просто…

С одной стороны — в Excel есть десятки способов, как можно сравнить две таблички между собой, с другой — в зависимости от конкретной задачи в каждом случае нужно «всё подгонять» под себя (универсального способа на все случаи жизни — нет!). 👌

Ниже приведу лишь парочку наиболее простых вариантов (разумеется, есть много др. способов решения).

Вариант 1

  1. для начала необходимо скопировать (сочетания в помощь: Ctrl+C / Ctrl+V) обе таблички на один лист в Excel (в качестве примера у меня табличка с именами 👇);

    Пример двух табличек

    Пример двух табличек

  2. далее нужно выделить мышкой область с этими двумя таблицами и перейти в меню «Главная / Условное форматирование / повторяющиеся значения» (см. пример ниже 👇);

    Выделяем таблицы, и вкл. повторяющиеся значения

    Выделяем таблицы, и вкл. повторяющиеся значения

  3. после, указать, что требуется выделить лишь «уникальные» значения — и Excel автоматически подсветит уникальные строки (т.е. те, которые отличны в таблицах). Как это выглядит — показано ниже. На мой взгляд задачу можно считать решенной. 👌

    Все отличия были найдены!

    Все отличия были найдены!

Вариант 2

В Excel есть одна довольно мощная функция ВПР — она позволяет сравнивать 2 таблицы и при нахождении чего-то «несовпадающего» — выполнять условие (скажем, подставить значение из одной таблицы в другую). О том, как с ней работать — показано в одной моей прошлой статье (парочка ссылок ниже).

👉 В помощь!

1) Excel: как сравнить 2 таблицы с помощью функции ВПР — см. простейший пример.

2) Повторяющиеся значения в Excel: как удалить дубликаты / уникальные строки.

*

Др. бинарные файлы Exe, Com и пр. (возможно без расширения)

Тема очень специфичная, и я включил ее в заметку только для общей информации.

Сравнить два EXE-файла (или любых других, у которых нет расширения, и вы даже не знаете их тип данных) можно с помощью спец. редактора шестнадцатеричных, десятичных и бинарных файлов. Например, один из доступных для начинающих — это 👉 Hex Editor Neo (ссылка на сайт разработчика).

Как с ней работать: сначала необходимо запустить программу и открыть в ней оба файла (это стандартно, как и в др. софте). Далее перейти в раздел «Tools / File Comparison / Compare Files». 👇

Hex Editor Neo — инструмент сравнения

Hex Editor Neo — инструмент сравнения

В результате Hex Editor Neo автоматически разделит экран поровну на две части и подсветит несовпадающий код. 👇

Пример сравнения

Пример сравнения

Разумеется, для дальнейшего редактирования и более-менее осмысленной работы — необходимы определенные знания / либо точно знать, какой кусок нужно удалить, поменять (можно, конечно, поэкспериментировать… но результаты могут быть самыми разными — от ошибок при запуске отредактированного файла, до «вылетов» синих экранов).

*

Картинки

Вообще, две картинки чаще всего сравнивают просто на «глазок», ставя их одну к одной. Впрочем, для этого можно использовать и спец. утилиты — например, те, которые используются для поиска дубликатов файлов. Я на страницах блога как-то упоминал о них, ссылка ниже в помощь.

👉 В помощь!

Программы для поиска дубликатов файлов, или как сравнить картинки, фото, документы, аудио и видео в разных папках.

Обратите внимание, программа Image Comparer 👇 автоматически выделят на картинках те области, к которым стоит присмотреться (либо есть различие, либо они не четкие и нельзя точно сказать наверняка…).

Image Comparer - скрин работы приложения (от разработчика)

Image Comparer — скрин работы приложения (от разработчика)

*

Дополнения по теме (👇), разумеется, приветствуются!

Успехов!

👋

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Windows media player hdr
  • Что такое режим бога на windows 10
  • Windows installer version check
  • Как выглядит знак windows
  • Driver pack solution онлайн windows 11