ULTRAEDIT VS. CSHARP

Help with writing and running scripts

ULTRAEDIT VS. CSHARP

Postby Project2501 » Fri Mar 23, 2007 11:12 am

hi!!
I'm from Spain, sorry about my bad English... :roll: I make an application in C#. In a form, I have to open Ultraedit with 2 files, and then compare them.

I need to know if Ultraedit returns some value to know if the files are equals or they are differents, to control it with C# code.

Thank you for the help
User avatar
Project2501
Newbie
 
Posts: 1
Joined: Thu Mar 22, 2007 11:00 pm

Re: ULTRAEDIT VS. CSHARP

Postby Bego » Fri Mar 23, 2007 12:09 pm

You can do a
Code: Select all
fc file1.txt file2.txt

from DOS-level to see if files are equal.

EDIT:

Here is a batch-file to do the job automatically. Its german, cause I'm low on time ... but its easy):
Code: Select all
@echo off

IF "%1%"=="" GOTO Fehler
IF "%2%"=="" GOTO Fehler


fc %1 %2 >nul
if %ERRORLEVEL%==1 goto machwas

echo Dateien sind gleich
goto ende
 

:machwas
echo Dateien sind ungleich
goto ende


:Fehler
echo Fehler. Bitte 2 Dateien als Parameter angeben ..
goto ende

:ende


rds Bego
User avatar
Bego
Master
Master
 
Posts: 357
Joined: Wed Nov 24, 2004 12:00 am
Location: Germany


Return to Scripts