Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      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

      Comment


      • #4
        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

        Comment


        • #5
          Hey Chris

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

          Regards
          Heena







          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.

          Comment


          • #6
            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

            Comment


            • #7
              Chris,

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

              Thanks

              Comment


              • #8
                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

                Comment

                Working...
                X