Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2018
    Posts
    4

    Default Rules set up by Script

    Hi,

    Can You give me a solution for that how can I set up Rules by script ?

    Here this my script :-
    BCompare.exe /silent @"C:\Test\TEmp\Formate.txt" "C:\Test\TEmp\LeftFile.txt" "C:\Test\TEmp\RightFile.txt" "C:\Test\TEmp\Result.html"

    In Formate.txt script :-

    criteria rules-based
    filter "*.txt;"
    file-report layout:side-by-side options:display-mismatches,ignore-unimportant output-to:%3 &
    output-options:html-color,wrap-word %1 %2

    LeftFile.txt and RightFile.txt which I need to compare and Result.html which is my output file

    Here I want to Set up rules for Unimportant text like :- "Cents:\s\d{2,3}"
    so how can I set up that(Unimportant text) by script ?

    Thanks In Advance!

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    Hello,

    Unimportance or grammars cannot be defined in script. If you set the Unimportance in the graphical interface first, and define it to be the default behavior, then that will be used in script. We have a guide for defining unimportance here:
    http://www.scootersoftware.com/suppo..._unimportantv3

    If you perform the edits to default behavior, you can also note how this updates the BCSessions.xml, and perform those edits manually in another automated solution, altering a BC4 Portable Install before calling it for scripting.
    Aaron P Scooter Software

  3. #3
    Join Date
    Aug 2018
    Posts
    4

    Default

    Hi,

    Thanks for your prompt reply.
    So as far as I understand from your reply, If we have requirement to pass special REGEX to BC.exe It can be passed thru BCSession.xml.

    Can I edit it and pass it thru Command line.

    Because we have specific requirement that we will get REGEX input from user and then we need to display result based on that filter criteria.

    Thanks

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

    Default

    Hello,

    You would have to edit it manually before calling to BCompare.exe. Essentially, you a 'hacking' our settings outside of the program, but our settings are plain text and easy to alter as long as you use the correct syntax.

    I recommend changing the settings in the graphical interface first. This way you can save a backup copy of BCSessions.xml, open BC4 and add a new Unimportant regex, update defaults, etc, close BC4, and then save a copy of the updated BCSessions.xml. You can then use BC4 to compare the old and new BCSessions.xmls (and other .xmls if altering other settings) to see how they update, to determine the syntax needed for all of our various settings.

    Always back up the current BCsetting.xmls before performing manual edits, as a bad edit can cause them to no longer be loadable.
    Aaron P Scooter Software

  5. #5
    Join Date
    Aug 2018
    Posts
    4

    Default

    Hi,

    Thanks Aron.

    And our requirement is that multiple users can accessed at the same time in web application and they have different scenario for REGEX syntax .
    so can we use another file instead of BCSession.xml ? and if Yes then how we can use another file and load by default when we calling BCompare.exe ?

  6. #6
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,788

    Default

    If different user's are accessing, then you need to be careful which BCsettings.xmls are used and need to be edited. Is each a separate Windows User account and each has their own %AppData% folder with their own settings that can be updated?
    Aaron P Scooter Software

  7. #7
    Join Date
    Aug 2018
    Posts
    4

    Default

    Hi,

    In general scenario our application will be hosted on one server as it is Web Application, and It will be accessible by any authenticated user from browser.


    They will be having their own AppData folder in their machine but not in hosted server. so automatically it(BCsettings.xml) will be saved to their local system or where actual setting has been hosted?

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

    Default

    Beyond Compare settings will be stored on the hosted server running Beyond Compare.

    If Beyond Compare is installed for all users, then settings are stored in "%appdata%\scooter software\beyond compare 4" on the hosted server, where %appdata% is based on the user account running Beyond Compare on the server.

    If Beyond Compare is installed as a portable install, then settings XML files are stored in the portable install folder. If you need separate settings for each web user, you can create a separate portable install on the server for each web user.

    Beyond Compare isn't designed to run under a single user account with multiple settings locations for that single user, so there isn't a really clean method to do what you're describing.
    Chris K 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
  •