No announcement yet.

Import / Export and Rules usind command line

  • Filter
  • Time
  • Show
Clear All
new posts

  • Import / Export and Rules usind command line

    I have been checking the Automation with scripts section of the help manual. I actually want to compare files by applying mutiple rules. One scenario could be:

    1. Indicating key columns.
    2. Specify unimportant columns
    3. Apply decimal precision

    Is this possible using command line. I would want to have a detailed (HTML, csv etc) report. Highlighting mismatched.

    Also do we have a list of all possible commands that can be run through command line. The help manual do have a list of commands. Are they all or do we have more??

    I also want to import and export all my rules (could be multiple ) applied to a session, my tool settings etc etc . Is this possible through command line. If yes please share the sample code.

  • #2

    All of the command line (and scripting commands) are documented in the Help file in near the bottom in the two chapters: Command Line Reference and Scripting Reference. There is some additional scripting info in the Using Beyond Compare -> Automating with Script (such as using command line parameters %1 %2 etc).

    We do not currently have a command for importing/exporting session settings on the command line. Script can only load saved Folder Compare sessions. As a workaround, you can save a Folder Compare sessions with specific child session settings, for example:

    Open a Folder Compare in the graphical interface.
    Set the Name Filter to show only the files you want to generate a report with.
    Save the Folder Compare session.
    Double click one of the file pairs to open a child Data Compare session.
    Set your Session Settings, and in the Session Setting dialog (under the Session menu), change the dropdown from "Use for this view only" to "Use for all files in parent session" (if same session settings can be used for all the current files, alternatively use "Use for these files in parent session").

    Close the child session and re-save the parent folder compare.

    To test, close out of BC3 and open it up again and reload your saved folder compare. Double clicking the file pair should apply the saved child settings automatically and compare them as you expect without needing additional tweaking.

    You can then use a script that loads the session, selects the file, and generates a report:
    load FolderCompareSessionName
    expand all
    select all.files
    data-report layout:side-by-side output-to:"c:\bcreport.txt"

    How does this work for you?

    Another alternative is to have a Portable Install of BC3 to run your scripts, and to manually alter the BCSettings.xml files in the portable install directory during the automated process.
    Aaron P Scooter Software


    • #3
      Thanks Aaron.....I will test the solution given by you to find out whether it solve our issue or not.

      Please share details about portable install of can we install portable BC and how to use it ?


      • #4

        A Portable Install is one of the options during the initial install wizard (when running the setup.exe file). You would install to a location on your harddrive (for example c:\beyondcompare) that has read and write access. All of the settings files (BCFileFormats.xml BCSessions.xml, etc) are stored in the same directory. It is designed to be a self contained folder, something that you would run from a USB thumb drive. It does not have access to the windows right-click shell extension because of this; to uninstall, you would simply delete the folder.
        Aaron P Scooter Software


        • #5
          Set/Change Rules using Command line


          We have a requirement whether we can set/change the rules through command line.
          We have to setup different rules for different file sets. File sets are of the same type. We would not want to set up/change the rules in the system every time before running in command prompt as a batch.



          • #6

            Are the file names static? In that case you can have multiple formats setup in the File Formats dialog, with the file mask set to specific file names.
            Aaron P Scooter Software