Hi All
Need your help with some vb script that could be used to compare two txt files.
Our application would generate log files in txt format and our job is to compare these txt files pre-release and post release.
I want to go line by line and compare the text between the two sets of log files. There would be roughly 2000 of these logfiles so i dont want to open BC everytime i do a compare.
want to store the result for both pass or fail to a variable.
Is this something you guys have done in the past? if so can you guys please share the code.
I am using the code below but this open BC everytime i do a comparision
Option Explicit
Dim WSHShell, BC4, LeftSide, RightSide, lResult
Set WSHShell = CreateObject("WScript.Shell")
BC4 = """C:\New folder\Beyond Compare 4\Beyond Compare 4\BComp.exe"""
LeftSide = " ""C:\New folder\Beyond Compare 4\Test1.txt"""
RightSide = " ""C:\New folder\Beyond Compare 4\Test2.txt"""
lResult = WSHShell.Run(BC4 + "/quickcompare=binary " + + """" + LeftSide + """ """ + RightSide + """", 0, True)
If lResult > 1 And lResult Then WSHShell.Run (BC4 + """" + LeftSide + """ """ + RightSide + """")
regards
Need your help with some vb script that could be used to compare two txt files.
Our application would generate log files in txt format and our job is to compare these txt files pre-release and post release.
I want to go line by line and compare the text between the two sets of log files. There would be roughly 2000 of these logfiles so i dont want to open BC everytime i do a compare.
want to store the result for both pass or fail to a variable.
Is this something you guys have done in the past? if so can you guys please share the code.
I am using the code below but this open BC everytime i do a comparision
Option Explicit
Dim WSHShell, BC4, LeftSide, RightSide, lResult
Set WSHShell = CreateObject("WScript.Shell")
BC4 = """C:\New folder\Beyond Compare 4\Beyond Compare 4\BComp.exe"""
LeftSide = " ""C:\New folder\Beyond Compare 4\Test1.txt"""
RightSide = " ""C:\New folder\Beyond Compare 4\Test2.txt"""
lResult = WSHShell.Run(BC4 + "/quickcompare=binary " + + """" + LeftSide + """ """ + RightSide + """", 0, True)
If lResult > 1 And lResult Then WSHShell.Run (BC4 + """" + LeftSide + """ """ + RightSide + """")
regards
Comment