Page 1 of 1

Compare File tool not working accurately

Posted: Fri Aug 29, 2008 1:33 pm
by jdinstpetebeach
Why does Textpad include lines that are equal in the results of the Compare File tool? This causes it to be inaccurate and difficult to find the actual differenences in the file.

When using the tool I am ignoring differences due to upper and lower case and due to spaces or tabs.

Here is a simple example of what happens....
File 1 has the following data:
1
0
2
3
4
5

File 2 has the following data:
9
0
8
3
4
5

You will notice that lines 1 and line 3 are different (1 <> 9 and 2 <> 8 ). Also notice that line 2 is the same (0 = 0).
The results of the compare look like this:
1,3c1,3
< 9
< 0
< 8
---
> 1
> 0
> 2

You will notice that line 2 is part of the results even though they are equal. This happens with many lines in a file. It almost seems the compare is comparing blocks of lines instead of line by line. Does anyone know how to prevent this from happening and get a true line by line compare?

Posted: Fri Aug 29, 2008 4:22 pm
by ak47wong
The Compare Files tool produces the same output as the Unix diff utility. You can't prevent the behaviour you're describing.

If it's not suitable, you're better off using a separate file comparison program, such as one of those reviewed on this page.

Andrew