View Full Version : How to compare two csv file with 1 unimportant column in command line
Simplify
29-Sep-2010, 05:37 AM
Hi all,
Can someone to help me? I have tried to create command line comparision for two csv file, which should include one unimportant column.
i have files 31_A.csv and 31_B.csv and I need to make command line comparision so that there will be one unimportant column called ValuePlain. Can someone help me?
Cheers
-Simplify
Chris
30-Sep-2010, 01:48 PM
To compare two CSV files and ignore 1 column, you'll have to change the "Data Compare" session defaults to make the columns unimportant, then run a script to generate the comparison.
Here's how:
Open your CSV files interactively in Beyond Compare 3's Data Compare. Select "Session > Session Settings". Go to the "Columns" tab. Double click on a column you want to ignore. Check "Unimportant". Click OK. At the bottom of the Session Settings dialog, set the dropdown to "Also update session defaults", then click OK.
Next, create a script:
data-report layout:side-by-side options:ignore-unimportant output-to:c:\report.html output-options:html-color c:\file1.csv c:\file2.csv
To run the above script, use the command line:
bcompare.exe @c:\script.txt
It isn't possible to define unimportant columns from a script in the current version of Beyond Compare.
Simplify
01-Oct-2010, 05:58 AM
Thx for your answer. Very good.
How about case that I need to run 2 different comparision in command-line, where in first have 1 unimportant field and in 2nd have 3 unimportant field?
Cheers
-KN
Chris
04-Oct-2010, 04:36 PM
There isn't a good solution to compare files with different unimportant columns which need to be ignored from scripts. The only way to ignore columns from scripts is to change the default comparison settings while running Beyond Compare interactively. You would have to run BC interactively and change the default settings for each comparison.
Setting column importance from a script is on our wish list for a future version, but until it is added changing the defaults interactively is the only way to ignore columns for scripts.
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.