Is there a tool to compare values in .ini files? [closed]

I'm looking for a file comparison utility specifically for .ini files, typically used as settings files.

There are plenty of file comparison tools (WinDiff, Beyond Compare, CompareIt, WinMerge, ...), but none of the tools I tried can handle .ini files very well.

A typical .ini file could look like this:

[Settings]
Setting1=abc
Setting2=xyz

The tool should match lines based on the string before the equal sign, then show differences in everything else after the equal sign. The order of lines within a section (sections are indicated by square brackets) does not matter and should be ignored.

I can't find any tool that can handle this. Typically existing tools will show differences in the beginning of the line before the equal sign (if most of the text after the equal sign matches), they will struggle with re-ordered lines (either show it all as changed or match some lines and show the remaining as deleted in one place and then added in another). I even found some tools where matching text can be restricted e.g. using regular expressions, but these simply ignore the remainder of the line and I can't match lines up based on one pattern (i.e. everything before the equal sign) and then compare them based on another (everything after the equal sign).


Beyond Compare has a sorted INI rule you can download.


Yes, I know this is an ancient question, but I'd like to suggest a tool I wrote:

dzIniFileFormatter which is available from SourceForge


I've often just sorted the files before comparing. It won't help if you have something like

[foo]
bar1=xyz
bar2=abc
[foo2]
bar1=lky

but assuming that your keys are unique (and can therefore be matched to a section), it often works in a pinch.