Ideas on file comparison

I have two files, as a matter of interest ASM files, but not relevant I think. They are similar but with only small changes. I am trying to think of ways where I can get my code to highlight differences between the two files. I have thought about reading the file line by line and comparing them, but as soon as it hits the first difference it will throw the whole thing out and show the rest of the file as one big error.
Your thoughts on the possibility of this would be appreciated, even if its possible to do!
Thanks in adavance.
John
jdav3579Asked:
Who is Participating?
 
Bob LearnedConnect With a Mentor Commented:
Here is the best example of visual diff comparison that I could come up with in a short period:

RGDiff - Visual Diff Tool:
http://www.codeproject.com/tools/rgdiff.asp

There is also the WinDiff utility that you can run from the Command Line with arguments:

Windiff Overview:
http://www.microsoft.com/technet/prodtechnol/windowsserver2003/library/TechRef/ac1ff104-dde3-43ea-98af-e5cf5e513d4f.mspx

This is a Windows 2003 Server article, but this is a more generic utility that you can use easily.

Bob
0
 
Bob LearnedCommented:
Have you ever used SourceSafe?  SourceSafe has a Visual Difference comparison utility.  If you have seen it, then you'll notice that it inserts blanks to keep the comparisons synchronized.

Bob
0
 
jdav3579Author Commented:
Afraid am reasonably new to this type of programming. i have never seen it, heard it mentioned. It sounds sort of what I am looking for... could you elaborate any further, maybe links/code use examples if you have any?
thanks
John
0
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
jdav3579Author Commented:
I may have been a little ambiguous with my question, The files are basically text files and arent any coding to do with c#.
0
 
jdav3579Author Commented:
have done a little reading on it [sourcesafe] just then, its a function of visual studio isnt it. I want to create an application that will read what amounts to two text files and highlights the differences between the two, to see what modifications have been done to the files.
0
 
_TAD_Commented:


I guess the big question is:  Do you want to develop a tool, or would you be happy with downloading a free tool that will do it for you?

Some very good free tools that do this are:

Compare It!
TextPad

or you could even use MS Word
0
 
jdav3579Author Commented:
I am trying to learn c# but am always looking for small projects to work on to learn with. Some one said to me that they  have 2 files, an original and the same one but with modifications to it. But after a while they forget what the mods. are so they were interested in a app. to compare the 2 and highlight the differences. I enjoy the challenge of the project so would prefer to attempt it myself, but if its too complicated then I will have to go with the above off-the-shelf ones........
What do you think?
John
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.