If you need to compare two files using WinMerge, you can use the _WinMergeCompare2Files function as in the following example:
_Example() Func _Example() FileCopy(@ScriptFullPath, @ScriptFullPath & '.txt') FileWrite(@ScriptFullPath & '.txt', @CRLF & 'TEST' & @CRLF & @CRLF) _WinMergeCompare2Files(@ScriptFullPath, @ScriptFullPath & '.txt') EndFunc ;==>_Example Func _WinMergeCompare2Files($sLeftFilePath, $sRightFilePath, $fWaitForWinMerge = True) ; Left is orginal , Right is new Local Const $sWinMergeParamsKey = 'HKEY_CURRENT_USER\Software\Thingamahoochie\WinMerge' If FileExists($sLeftFilePath) And FileExists($sRightFilePath) Then Local Const $sWinMergeExecutable = RegRead($sWinMergeParamsKey, 'Executable') Local Const $sFileName = StringRegExp($sLeftFilePath, '(?i).*\\(.*)', 3) Local Const $sWinMergeParams = _ ' /u /e /xq /wl /maximize /dl "Original: ' & $sFileName & '" /dr "New version: ' & $sFileName & '" ' & _ '"' & $sLeftFilePath & '"' & ' ' & '"' & $sRightFilePath & '"' If $fWaitForWinMerge Then ShellExecuteWait($sWinMergeExecutable, $sWinMergeParams) Else ShellExecute($sWinMergeExecutable, $sWinMergeParams) EndIf EndIf EndFunc ;==>_WinMergeCompare2Files
Hi everyone , hope some masters and MVP could help me on this.
I have 2 files to compare file1.txt and file2.txt
Both files have like 20000 lines and it's hard for me to go through them line by line.
Here's an example of the lines :
I need to read the first string 212121212121 before ý from file1.txt and compare it to the same string on file2.txt then if anything on the same line from both files is different then copy the whole line in another file result.txt
I'm really sorry i got stuck on this as i could figure out if i should use FileRead/_FileReadToArray or FileReadLine or StringMid
Please help me at least how to start my script
Thank you so much