Jump to content

how to compare file contents?


 Share

Recommended Posts

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
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...