Jump to content

copmare files


Recommended Posts

Hi,

I'm looking for built in function that will compare between 2 text files. (Like comp at DOS)

Any ideas?

Thx,

Lior

i just made this...maybe this can help

http://www.autoitscript.com/forum/index.php?showtopic=20460#

post 13

this is comparing filenames in 2 text files

Edited by ACalcutt

Andrew Calcutt

Http://www.Vistumbler.net

Http://www.TechIdiots.net

Its not an error, its a undocumented feature

Link to comment
Share on other sites

Hi,

I'm looking for built in function that will compare between 2 text files. (Like comp at DOS)

Any ideas?

Thx,

Lior

what kind of comparison? i mean do you want a list of lines from one that aren't in the other? a list of every diff char? a list of all lines that are present in both files? a list of all lines in either file? a yes/no response saying that the files are exactly the same or not? sorry, i'm not familiar with comp
Link to comment
Share on other sites

  • Moderators

what kind of comparison? i mean do you want a list of lines from one that aren't in the other? a list of every diff char? a list of all lines that are present in both files? a list of all lines in either file? a yes/no response saying that the files are exactly the same or not? sorry, i'm not familiar with comp

;) No, I want to make sure they are compatable, for breeding. :lmao:

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

...(Like comp at DOS)...

Check out randallc's User Defined Functions (UDF):

http://www.autoitscript.com/forum/index.php?showtopic=17615

You could do these same things within AutoIt, but it might be faster to just have AutoIt run the DOS command and display the results in various ways.

C:\>comp /?

Compares the contents of two files or sets of files.

COMP [data1][data2] [/D] [/A] [/L] [/N=number] [/C] [/OFF[LINE]]

data1 Specifies location and name(s) of first file(s) to compare.

data2 Specifies location and name(s) of second files to compare.

/D Displays differences in decimal format.

/A Displays differences in ASCII characters.

/L Displays line numbers for differences.

/N=number Compares only the first specified number of lines in each file.

/C Disregards case of ASCII letters when comparing files.

/OFF[LINE] Do not skip files with offline attribute set.

To compare sets of files, use wildcards in data1 and data2 parameters.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

  • Moderators

Hi ,

I just looked for a yes/no answer response of saying that the files are exactly the same or not.

Thx,

Lior

Think of it as a bonus :lmao: (and it was directed at cameronsdad not you ;) )

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...