473,386 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Comparing text files

I realize this might not be the correct newsgroup, but since I have a
general question I need answering in the context of doing a managed VC++.NET
Managed application, this is as good a place as any to get the ball rolling.
Where is the appropriate place to ask the following question:

Is there any way to compare two text files to see if they are identical?
There use to be an easy DOS command many years back, but not sure how to do
this in Windows XP!

[==Peteroid==]
Nov 17 '05 #1
5 1488
Peteroid wrote:
I realize this might not be the correct newsgroup, but since I have a
general question I need answering in the context of doing a managed
VC++.NET Managed application, this is as good a place as any to get
the ball rolling. Where is the appropriate place to ask the following
question:
Is there any way to compare two text files to see if they are
identical? There use to be an easy DOS command many years back, but
not sure how to do this in Windows XP!


fc.exe still exists - you could always shell out to fc to compare the files
for you (use ShellExecute or a member of the *exec*() family of fine
functions in the C runtime library, or CreateProcess from the Win32 API if
you're a glutton for punishment.

You can also read the contents of the files into blocks of memory and
compare them yourself. If the files might be large, you'd want to write
code that's a bit more general and compares the files in chunks rather than
all at once so you don't have to allocate large blocks of memory.

-cd
Nov 17 '05 #2

You may use some software like the Compare Suite from the AKS Labs.

--
JonnieO
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 17 '05 #3
Peteroid wrote:
Is there any way to compare two text files to see if they are identical?
There use to be an easy DOS command many years back, but not sure how to do
this in Windows XP!


If you're looking for an application there's open source project
WinMerge <http://www.winmerge.org/> that is doing an excellent job of
not only comparing files and directories, but merging them as well.
Nov 17 '05 #4
You may want to check our Compare It! tool from http://www.grigsoft.com/.

Igor Green
http://www.grigsoft.com/
Compare It! + Synchronize It! - files and folders comparison never was easier!
Nov 17 '05 #5
sam


"Peteroid" wrote:
I realize this might not be the correct newsgroup, but since I have a
general question I need answering in the context of doing a managed VC++.NET
Managed application, this is as good a place as any to get the ball rolling.
Where is the appropriate place to ask the following question:

Is there any way to compare two text files to see if they are identical?
There use to be an easy DOS command many years back, but not sure how to do
this in Windows XP!

[==Peteroid==]

<sam> you can use Windiff tool, which is available if you install microsoft
visual studio .
<sam>

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Wescotte | last post by:
I'm writing a tiny php app that will log into our bank of america account and retrieve a file containing a list of checks that cleared the previous day. The problem I'm running into is when I...
4
by: ddd | last post by:
I am trying to build a diff tool that allows me to compare two HTML files. I am looking for resources on how to achive this. The main problem is that I do not want to simply highlight the line of...
6
by: Holger Kasten | last post by:
Hello, I am looking for a fast and efficient way to compare two text files and create a thrid one. E.g. Input file 1: Number 1 Number 2
0
by: richardkreidl | last post by:
I have the following hash script that I use to compare two text files. 'Class Public Class FileComparison Public Class FileComparisonException Public Enum ExceptionType U 'Unknown A 'Add...
3
by: =?Utf-8?B?UG9vamE=?= | last post by:
Hi I have been using Microsoft XmlDiffPatch to compare 2 XML files. I wanted to know if there is any Microsoft Tool which can be used to compare two HTML files in the similar manner or any...
2
by: Smithers | last post by:
I would appreciate some recommendations for programmatically determining if files differ. I'm writing a utility that backs up files that customers upload to Web sites. Rather than mindlessly...
9
by: Shriphani | last post by:
Hello all, I have a problem here. I have a list named list_of_files which contains filenames with their timestamps attached to the name. If I have a string "fstab", and I want to list out the...
1
by: Yash | last post by:
Hi, We are in the process of tuning the performance of our stored procs in SQL 2000 and are looking for a tool that would help us in comparing the result sets of an old SP and a modified SP. The...
3
by: erbrose | last post by:
Hello all! Newbie here, I've been tasked with a fairly intensive project here and my perl skills are still at a minimum so this post may eventually turn into a long one, but I am only going to ask...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.