Link to home
Start Free TrialLog in
Avatar of DANNY JACOB
DANNY JACOB

asked on

Beyond Compare Text File Compare using Batch File

Hi,

I have 2 sets of same files created with different time stamps and I want to compare these files using beyond compare. However each set has multiple files so I want this comparison to run in a loop until it reaches end of files in the folder.

eg:

Set 1:
output_sql20170522-2022_1.txt
output_sql20170522-2022_2.txt
output_sql20170522-2022_3.txt

Set 2:
output_sql20170522-2135_1.txt
output_sql20170522-2135_2.txt
output_sql20170522-2135_3.txt

Both Set 1 and Set 2 files are present in same folder. So I want the comparison to happen as below,
output_sql20170522-2022_1.txt to be compared with output_sql20170522-2135_1.txt
output_sql20170522-2022_2.txt to be compared with output_sql20170522-2135_2.txt
output_sql20170522-2022_3.txt to be compared with output_sql20170522-2135_3.txt

And each of the output should be saved to a report.

Kindly help!
Avatar of Bill Prew
Bill Prew

So if I understand, you want to compare the matching files to each other.  Is that match based on the _1, _2 etc at the end of the filename?  Or some other matching criteria?

Also, do you have a command line you are using to compare the files using Beyond Compare, with the options you want, and generating a single report?  If so please share that.


»bp
Avatar of DANNY JACOB

ASKER

Yes. The match should be based on _1, _2 etc.  The command line which I am using for comparing using beyond compare is,

"Local Directory\BCompare.exe" @"Local Directory\BCscript.txt" "Local Directory\output_sql20170522-2022_1.txt" "Local Directory\output_sql20170522-2135_1.txt" "Local Directory\ComparisonReport.txt"

Pattern is,
"Launch Beyond Compare" "Beyond Compare Report Script - Report Layout Script" "Source File for Comparison" "Target File for Comparison" "Comparison Report"
ASKER CERTIFIED SOLUTION
Avatar of Bill Prew
Bill Prew

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial