Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2010
    Posts
    2

    Default How to compare two csv file with 1 unimportant column in command line

    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

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,758

    Default

    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.
    Chris K Scooter Software

  3. #3
    Join Date
    Sep 2010
    Posts
    2

    Default

    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

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,758

    Default

    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.
    Chris K Scooter Software

  5. #5
    Join Date
    Apr 2015
    Posts
    1

    Default

    Hey Chris

    Is BC3 having option to define columns unimportant through the scripts ?

    Regards
    Heena







    Quote Originally Posted by Chris View Post
    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.

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    4,758

    Default

    Sorry, column importance for DATA-REPORT still cannot be defined in a script in Beyond Compare 3.3.13 or 4.0.7.

    Changing the default session settings in the GUI or loading a saved session created in the GUI is still the only way to mark a column unimportant for scripting.
    Chris K Scooter Software

  7. #7
    Join Date
    Jul 2018
    Posts
    1

    Default

    Chris,

    Any updates/version on marking a column as unimportant through a script?

    Thanks

  8. #8
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,948

    Default

    Thanks. No updates yet for additional command line support. The workaround is to alter the BCSessions.xml before running the script call, update the default settings, and then run the script. To test different default settings, I would suggest altering them in the main graphical interface, which allows you to see how the settings work and how they are generating in the BCSessions.xml automatically.
    Aaron P Scooter Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •