[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Ideas on file comparison

Posted on 2005-05-13
7
Medium Priority
?
179 Views
Last Modified: 2010-04-16
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
0
Comment
Question by:jdav3579
  • 4
  • 2
7 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 13998389
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
 

Author Comment

by:jdav3579
ID: 13998443
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
 

Author Comment

by:jdav3579
ID: 13998463
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:jdav3579
ID: 13998511
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
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 13998514
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
 
LVL 22

Expert Comment

by:_TAD_
ID: 13999243


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
 

Author Comment

by:jdav3579
ID: 14048305
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

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?

825 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