; variables should be declared!
$aFData1 = FileIO($Source1, 'R') ; read the first (Master) file
$aFData2 = FileIO($Source2, 'R') ; read the second file
; Convert the master file to a delimited string to simplify matching the second file array
; The source will look like "~line1~line2~line3~...~"
; The delimiter character chosen MUST NOT appear in the source data. Use "Chr(3)"
; as a non-text delimiter if this is an issue (replace "'~'" with "Chr(3)" in this example)
$Source = '~' + Join($aFData1, '~')
; Enumerate the file to "clean up" - lines that exist in file 1 will be removed
For $P = 0 to UBound($aFData2)
; If the current line "~line#~" is found in $Source, clear it!
If InStr($Source, '~' + $aFData2[$P] + '~')
$aFData2[$P] = ''
EndIf
Next
; All dups have been removed from the second file - write it back, trimming blank lines
$aFData2 = FileIO($Source2, 'W', 2)