Sign in to follow this  
Followers 0
LiorEfron

copmare files

7 posts in this topic

Hi,

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

Any ideas?

Thx,

Lior

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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:


[center]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.[/center]

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

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

Hi ,

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

Thx,

Lior

Share this post


Link to post
Share on other sites

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 ;) )


[center]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.[/center]

Share this post


Link to post
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
Sign in to follow this  
Followers 0