how to compare contents of two similar text files

Posted on 2014-08-06
Last Modified: 2014-08-06
two or more text files of the same name were edited several times.
How do we compare the contents of the files without reading through hundreds of lines of text?
Question by:AMixMaster
    LVL 13

    Accepted Solution

    check out comp. Go to a command prompt and type the following for usage:

    comp /?

    You can direct output to a text file to see the results using ">" or ">>".
    LVL 82

    Assisted Solution

    by:Dave Baldwin
    For Windows, I recommend Winmerge.  It will highlight the differences for you.
    LVL 51

    Assisted Solution

    by:Joe Winograd, EE MVE
    I've been using an excellent file manager called Total Commander for many years:

    One of its many features is the ability to compare two text files. Using the beginning of this post as an example (with an intentionally missing line, extra line, and a changed line), here's what the comparison results look like:

    TC compare results
    I use this feature so often that I assigned an icon to it and placed it on the Button Bar:

    TC Button Bar - compare files by content
    It is not free, but it is among the best 46 dollars (USD) that I've ever spent. Well, I probably spent less many years ago when I bought it (and all upgrades have been free), but that's what a personal license costs today. Also, the personal license grant is generous. Here's a quote:

    "The registered version may be installed on as many computers as desired, as long as it is used by only one person at any one time (I.e. one installation at home and one at the office used by the same person). Therefore you need only one licence for a port connection between two computers. The usage by multiple people at the same time (on multiple computers) requires additional licences."

    Furthermore, it is shareware, and you may download a fully functional version to see if it works for you before making a purchase.

    The product does lots of other stuff, but I have limited my response to addressing just your issue. Btw, the support is fabulous. When I send an email to tech support, I always get a prompt, accurate answer. In more than a decade of using this file manager, from Windows 95 through my current 64-bit W7 and W8, it has never messed up a file.

    As a disclaimer, I want to emphasize that I have no affiliation with this company and no financial interest in it whatsoever. I am simply a happy user/customer. Regards, Joe

    Author Closing Comment


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
    In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
    Video by: Tony
    This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
    Viewers will learn how to use the Hootsuite Dashboard.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now