- /Diff (devenv.exe) /Diff (devenv.exe)
- Синтаксис Syntax
- Аргументы Arguments
- Комментарии Remarks
- Пример Example
- Diff Tools on Windows
- Beyond Compare
- Araxis Merge
- KDiff3
- Get the Git Cheat Sheet
- DeltaWalker
- P4Merge
- Code Compare
- WinMerge
- Guiffy
- Integrations
- Conclusion
- Get the Git Cheat Sheet
- WinMerge
- What is WinMerge?
- Screenshot
- Features
- General
- File Compare
- Folder Compare
- Image Compare New!
- Table Compare New!
- Version Control
- Other
- WinMerge 2.16.10 — latest stable version
- Project News
- Support
- Developers
- WinMerge
- Что такое WinMerge?
- Скриншот
- Особенности (фичи)
- Общее
- Сравнение файлов
- Сравнение содержимого каталогов
- Image Compare New!
- Table Compare New!
- Управление версиями
- Другое
- WinMerge 2.16.10 — последняя стабильная версия
- Новости проекта
- Поддержка
- Разработчики
- What is the Windows equivalent of the diff command?
- 13 Answers 13
/Diff (devenv.exe) /Diff (devenv.exe)
Сравнение двух файлов. Compares two files. Различия отображаются в специальном окне Visual Studio. The differences are displayed in a special Visual Studio window.
Синтаксис Syntax
Аргументы Arguments
Обязательный. Required. Полный путь и имя первого файла, который следует сравнить. The full path and name of the first file to be compared.
Обязательный. Required. Полный путь и имя второго сравниваемого файла. The full path and name of the second file to be compared.
Необязательный параметр. Optional. Отображаемое имя первого файла. The display name of the first file.
Необязательный параметр. Optional. Отображаемое имя второго файла. The display name of the second file.
Комментарии Remarks
Если экземпляр интегрированной среды разработки уже открыт, сравниваемые файлы появятся на вкладке в текущей среде. If an instance of the IDE is already open, the file comparison appears in a tab in the current IDE.
Пример Example
Первый пример сравнивает два файла, не изменяя отображаемые имена. The first example compares two files without changing their display names. Второй пример сравнивает файлы, изменяя отображаемые имена. The second example compares the files while changing both of their display names. Третий и четвертый примеры сравнивают два файла, но применяют псевдоним только к одному из них. The third and fourth examples compare two files but apply an alias to only the first file or the second file.
Diff Tools on Windows
Working on the Mac? Check out our post about Diff Tools on macOS!
Staying up-to-date in a software, writing, or design project is hard — especially when multiple people are working on it. Without the right tools, you won’t be able to understand the changes that move the project forward.
This is where a diff tool comes in handy. It makes changes visible and helps you understand them. In this article, we’ve compiled a short list that helps you get an overview of the best diff tools on Windows.
Being free and open source, Meld is a very popular tool on Windows (it’s also available for Linux). It supports three-way comparing and merging and lets you edit files directly from the comparison view. Apart from diffing files, Meld also supports comparison of folders.
Beyond Compare
The Beyond Compare team makes a fine diff tool for Windows (as well as macOS and Linux, by the way). It goes well beyond (pun intended) diffing simple text and also allows comparing PDF, Excel and image files. The «Pro» version also includes a solid three-way merge.
Araxis Merge
Just like Beyond Compare, Araxis Merge supports more than just text and image files. It also lets you compare office documents (like MS Word, Excel, Powerpoint, or ODF). It comes in standard and professional editions, and for people working on both Windows and macOS, it’s good to know that a single license is valid for both platforms.
KDiff3
Another free and open source tool answers to the name of KDiff3. The project hasn’t seen many updates in recent years (though you may be able to find more recent releases through this page), but it remains a solid diff and merge tool that should satisfy basic needs.
Get the Git Cheat Sheet
Download one of the web’s most popular resources on Git! It’s free!
DeltaWalker
Much like Araxis, the DeltaWalker diff tool also lets you compare office files. However, it goes one step further by letting you compare file archives like ZIP, JAR, and TAR files. If you’re regularly performing comparisons on a folder basis, it’s good to know that DeltaWalker shines with great performance in this area. DeltaWalker supports Windows, macOS and Linux.
P4Merge
Perforce, the company best known for its enterprise version control platform, also offers a solid diff tool: P4Merge is free of charge and comes with a basic feature set that makes it an interesting option on Windows, macOS and Linux.
Code Compare
Besides offering all the standard diff and merge capabilities, Code Compare comes with some special features like syntax highlighting, semantic code comparison and a VisualStudio integration.
The basic version can be used free of charge, while the Professional Edition delivers the full feature set.
WinMerge
WinMerge is an open-source diff tool with some nice features like folder and image comparison, and three-way file comparison.
Guiffy
Guiffy is a full-featured tool with syntax highlighting, three-way comparisons and merges, and multiple comparison algorithms. It comes in pro and expert versions, and supports Windows, macOS and Linux.
Integrations
Another aspect to watch out for is integrations: before choosing your favorite tool, you should make sure that it plays nicely with the rest of your tool chain. I can already confirm that most of the mentioned tools work seamlessly with Tower, our own Git client.
If you don’t need the power of a dedicated Diff tool application, the integrated diff views in Tower might even be sufficient for you:
Conclusion
Diff & merge apps are amongst the most underestimated tools. But a good one can be really helpful in a lot of situations. Try one of the above and see for yourself!
Get the Git Cheat Sheet
Download one of the web’s most popular resources on Git! It’s free!
WinMerge
You will see the difference…
What is WinMerge?
WinMerge is an Open Source differencing and merging tool for Windows. WinMerge can compare both folders and files, presenting differences in a visual text format that is easy to understand and handle.
Screenshot
See the screenshots page for more screenshots.
Features
WinMerge is highly useful for determining what has changed between project versions, and then merging changes between versions. WinMerge can be used as an external differencing/merging tool or as a standalone application.
In addition, WinMerge has many helpful supporting features that make comparing, synchronising, and merging as easy and useful as possible:
General
- Supports Microsoft Windows XP SP3 or newer
- Handles Windows, Unix and Mac text file formats
- Unicode support
- Tabbed interface
File Compare
- 3-way File Comparison New!
- Visual differencing and merging of text files
- Flexible editor with syntax highlighting, line numbers and word-wrap
- Highlights differences inside lines
- Difference pane shows current difference in two vertical panes
- Location pane shows map of files compared
- Moved lines detection
Folder Compare
- Regular Expression based file filters allow excluding and including items
- Fast compare using file sizes and dates
- Compares one folder or includes all subfolders
- Can show folder compare results in a tree-style view
- 3-way Folder Comparison
Image Compare New!
- Support many types of images
- Can highlight the differences with blocks
- Overlaying of the pictures is possible
Table Compare New!
- Shows CSV/TSV file contents in table format
- Text can be wrapped for each column
Version Control
- Creates patch files (Normal-, Context- and Unified formats)
- Resolve conflict files
Other
- Shell Integration (supports 64-bit Windows versions)
- Archive file support using 7-Zip
- Plugin support
- Localizable interface
- Online manual and installed HTML Help manual
WinMerge 2.16.10 — latest stable version
WinMerge 2.16.10 is the latest stable version, and is recommended for most users.
Project News 
- WinMerge 2.16.4 (stable) released2019-08-02
- WinMerge 2.16.2 (stable) released2019-04-04
- WinMerge 2.16.0 (stable) released2018-11-27
- A sign of life from WinMerge2018-01-29
- WinMerge 2.14.0 (stable) released2013-02-03
- View all news…
Support
If you need support, look at our support page for more information how you can get it.
Developers
WinMerge is an open source project, which means that the program is maintained and developed by volunteers.
In addition, WinMerge is translated into a number of different languages. See our information on translating WinMerge into your own language.
WinMerge
You will see the difference…
Что такое WinMerge?
WinMerge является Open Source инструментом сравнения и слияния для Windows. WinMerge может сравнивать как файлы, так и папки, отображая различия в визуальной текстовой форме, которые легко понять и обработать.
Скриншот
Смотрите страницу скриншотов чтоб увидеть больше.
Особенности (фичи)
WinMerge является весьма полезной для определения мест, которые изменились между версиями проекта, а затем она позволяет объединять изменения между версиями. WinMerge можно использовать в качестве внешнего инструмента определения разностей/слияния, или как автономное приложение.
В дополнение, WinMerge имеет множество вспомогательных возможностей, которые делают процесс сравнения, синхронизации и слития настолько простым, насколько это возможно:
Общее
- Supports Microsoft Windows XP SP3 or newer
- Обработка текстовых форматов файлов Windows, Unix и Mac
- Поддержка Unicode
- Интерфейс с закладками
Сравнение файлов
- 3-way File Comparison New!
- Визуальная подсветка изменений и слияния текстовых файлов
- Удобный редкатор с подсветкой синтаксима, нумерацией строк и переносом строк
- Подсветка изменений внутри строки
- Панель различий показывает различия текущего файла в двух вертикальных панелях
- Панель расположения отображает карту сравниваемых файлов
- Обнаружение перемещенных строк
Сравнение содержимого каталогов
- Фильтрация файлов, основанная на регулярных выражениях, позволяет включать и исключать элементы из выборки
- Быстрое сравнение, учитывающее размеры файлов и даты
- Сравнение одного каталога, или сравнение включая подкаталоги
- Может отображать результат сравнения папок в виде дерева
- 3-way Folder Comparison
Image Compare New!
- Support many types of images
- Can highlight the differences with blocks
- Overlaying of the pictures is possible
Table Compare New!
- Shows CSV/TSV file contents in table format
- Text can be wrapped for each column
Управление версиями
- Создает файлы патчей (Normal-, Context- и Unified форматы)
- Разрешить конфликты файлов
Другое
- Интеграция с контекстным меню (поддерживает 64-битные версии Windows)
- Поддержка архивов осуществляется с помощью 7-Zip
- Поддержка плагинов.
- Локализуемый интерфейс
- Онлайн-руководство и установленное HTML-руководство
WinMerge 2.16.10 — последняя стабильная версия
WinMerge 2.16.10 является самой последней стабильной версией, рекомендуемой для большинства пользователей.
Новости проекта 
- WinMerge 2.16.4 (stable) released2019-08-02
- WinMerge 2.16.2 (stable) released2019-04-04
- WinMerge 2.16.0 (stable) released2018-11-27
- A sign of life from WinMerge2018-01-29
- WinMerge 2.14.0 (stable) released2013-02-03
- Смотреть все новости…
Поддержка
Если нужна поддержка, смотрите страницу поддержки для большего количества информации о том, как ее получить.
Разработчики
WinMerge является проектом с открытым исходным кодом, а значит поддерживается и разрабатывается волонтерами.
В дополнении ко всему, WinMerge переведен на множество различных языков. Смотрите нашу информацию о переводах WinMerge по вашему языку.
What is the Windows equivalent of the diff command?
I know that there is a post similar to this : here.
I tried using the comp command like it mentioned, but if I have two files, one with data like «abcd» and the other with data «abcde», it just says the files are of different sizes. I wanted to know where exactly they differ. In Unix, the simple diff tells me which row and column, the comp command in windows works if I have something like «abd» and «abc». Not otherwise. Any ideas what I can use for this?
13 Answers 13
Run this in the CMD shell or batch file:
FC can also be used to compare binary files:
Well, on Windows I happily run diff and many other of the GNU tools. You can do it with cygwin, but I personally prefer GnuWin32 because it is a much lighter installation experience.
So, my answer is that the Windows equivalent of diff , is none other than diff itself!
Winmerge has a command line utility that might be worth checking out.
Also, you can use the graphical part of it too depending on what you need.
Another alternative is to download and install git from here. Then, add the path to Git\bin\ to your PATH variable. This will give you not only diff, but also many other linux commands that you can use from the windows command line.
You can set the PATH variable by right clicking on Computer and selecting Properties. Then you can click on Advanced System Settings on the left side of the screen. In the pop up, click Environment Variables and then either add or update the PATH variable in your user variables with Git\bin\
FC works great by in my case it was not helpful as I wanted just the lines that are changed. And FC give additional data like file name, same lines and bilateral comparison.
but in my case I wanted only the lines that have changed and wanted those lines to be exported to different file, without any other header or data.
So I used «findstr» to compare the file :
data.txt.bak is the name of old file
data.txt is the name of new file
DiffResult.txt contains the data that is changed i.e just one line ####09
There’s also Powershell (which is part of Windows). It ain’t quick but it’s flexible, here’s the basic command. People have written various cmdlets and scripts for it if you need better formatting.
Not part of Windows, but if you are a developer with Visual Studio, it comes with WinDiff (graphical)
But my personal favorite is BeyondCompare, which costs $30.
fc. fc is better at handling large files (> 4 GBytes) than Cygwin’s diff.
DiffUtils is probably your best bet. It’s the Windows equivalent of diff.
To my knowledge there are no built-in equivalents.
The reason you getting the error with COMP is that the utility assumes the files that you are comparing are of the same size. To overcome that you can use th ‘/n’ option with which you can specify the number of lines you want to compare. (see the options supported by comp by typing ‘comp /?’ on the command line. so your command would look like :
This should solve your problem if you wanna stick to using COMP. But this will be a problem for really large files.
Though comp is an option, but I feel it is primitive and FC is a better option. you can use FORFILES and FC together to probably make a really good filecompare utility if you require one on a frequent basis.
FC is used this way for ref:
there are many options available which you can see by ‘fc /?’ hope this helps