No announcement yet.

ignore whilespace in comparison

  • Filter
  • Time
  • Show
Clear All
new posts

  • ignore whilespace in comparison


    I have 2 txt files for comparison and both the txt files have some extra whitespaces. Now, even though the both txt files have similar data, it gives failure because of extra whitespaces which does not match on both files.

    How can I ignore these white space and comparison results gives me pass? I am using beyond compare through command line.

    Thanks in advnace for your help.


  • #2
    Here's how to ignore whitespace differences in Beyond Compare 2:

    Select "Tools > Options".
    Go to the "Rules" section.
    Select the rule that matches the extension of your files and click Edit.
    Go to the Importance tab and uncheck "Leading whitespace", "Embedded Whitespace", "Trailing Whitespace", and "Blank Lines".

    Changing the above settings will affect interactive comparisons and command line comparisons using scripting. If you continue to have trouble comparing from the command line, please post the script that you're running.
    Chris K Scooter Software


    • #3
      Hi Chris,

      It does now remove the red line and shows green line, but still displays all the records even though there is no difference other than white space.

      How can I just display "Just differences" and not the actual data?

      I am attaching 2 text files which I am comparing.



      • #4

        Normally unimportant differences would show in a Blue color. Did you customize your color settings to show them as green?

        In Beyond Compare 3, differences can be defined as important or unimportant. Unchecked items are unimportant in the Importance tab. Unimportant items normally show up in a blue color, but are still considered differences. If you then toggle on "Ignore Unimportant Differences" in the toolbar (squiggly equal sign) or in the View menu, the blue differences will change color to normal black/equal text. You can then use the Show Differences toggle to only show differences (red/important differences).

        How does this work for you?
        Aaron P Scooter Software