By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,887 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,887 IT Pros & Developers. It's quick & easy.

Comparing text files

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a

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

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

Nov 17 '05 #3

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.