Sign in to follow this  
Followers 0
jagordon

how to compare file contents?

4 posts in this topic

Is there a function that will allow you to compare the contents of 2 files?

I'm looking for a shortcut, instead of populating arrays and looping through them. :-)

Share this post


Link to post
Share on other sites



Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Is there a function that will allow you to compare the contents of 2 files?

I'm looking for a shortcut, instead of populating arrays and looping through them. :-)

Hi,

Not a shortcut, but fast and in AutoIt, and pre-writtendisplay UDF;

I also need someone to test it!

Best, Randall

; ArrayCompareEx2a.au3
#include<ArrayDupes8.au3>
#include<_ArrayDisplaySort.au3>
Local $iNum = 1000
local $ar_Array1[$iNum],$ar_Array2[1]
For $i = 0 To $iNum - 1
    $ar_Array1[$i] = "Item" & $i
Next
$ar_Array2=$ar_Array1
For $i = 0 To $iNum - 1 step 50
    $ar_Array2[$i] = "Items2Add" & $i
Next
Local $ar_UnMatchedItems = _ArrayCompare($ar_Array1, $ar_Array2, 1, 0, 1, 1)
If $ar_UnMatchedItems[UBound($ar_UnMatchedItems) - 1] <> "" Then _ArrayDisplaySort($ar_UnMatchedItems, "$ar_Array1 vs $ar_Array2", 0, 10)
Edited by randallc

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