BC 4.1.2 Folder Compare still uses BCSessions.xml?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phil
    Journeyman
    • Mar 2015
    • 19

    BC 4.1.2 Folder Compare still uses BCSessions.xml?

    Hello,

    I'm comparing some Folders via command line script. If I use the BC Version 4.0.5 it seems to use my BCSessions.xml. But in the Version 4.1.2 it seems it doesn't. Perhaps that was change? My BCSessions.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <BCSessions Version="1" MinVersion="1">
    <TSessionFolder>
    <Items>
    <TTextCompareSession>
    <Rules>
    <Insigs>
    <_0>
    <FindText Value="(0[1-9]|[12][0-9]|3[01])\.(0[1-9]|1[012])\.(19|20)\d\d"/>
    <IsRegExp Value="True"/>
    </_0>
    </Insigs>
    </Rules>
    </TTextCompareSession>
    </Items>
    </TSessionFolder>
    </BCSessions>

    Background info: the regEx above matches Dateformats that we use in germany like today we have 25.11.2015. So if I compare with the older mentioned BC version, it uses this BCSessions.xml to filter some differences as unimportant. After that I generate BCSessions.xml for every file that really have differences (dateformats already filtered by the Folder Compare with the BCSessions.xml above). In the Version 4.1.2 it seems that it doesn't use the BCSessions.xml, so it doesn't filter anything as unimportant 'cause the Date changes everytime. As a result the text compare have to do the filtering for every file, which shouldn't be necessary.

    I Hope I explained the problem good enough.
  • Aaron
    Team Scooter
    • Oct 2007
    • 16000

    #2
    Hello,

    I tested this out in the graphical interface by launching a Folder Compare, then clicking into a pair of text files, and within that child Text Compare your settings come through as expected. Do you see this behavior if you try this test?

    If so, there is probably something unexpected happening in your specific script. Are you running a Rules-based scan? Generating a Text-Report on a selection of files in a Folder Compare? If the files are triggering/opening with the Table Compare or Hex Compare then they wouldn't use these settings. And, you are using a Portable Install for the automated call, correct? Otherwise, different Windows User accounts would use different stored settings.
    Aaron P Scooter Software

    Comment

    • phil
      Journeyman
      • Mar 2015
      • 19

      #3
      Hello,

      yes, I see this behavior.
      If I use the setting: Foldercompare > compare > compare content > rule based compare for the session defaults
      it generates a BCSessions.xml like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <BCSessions Version="1" MinVersion="1">
      <TSessionFolder>
      <Items>
      <TDirCompareSession>
      <Rules>
      <UseContentComparison Value="True"/>
      </Rules>
      </TDirCompareSession>

      <TTextCompareSession>
      <Rules>
      <Insigs>
      <_0>
      <FindText Value="(0[1-9]|[12][0-9]|3[01])\.(0[1-9]|1[012])\.(19|20)\d\d"/>
      <IsRegExp Value="True"/>
      </_0>
      </Insigs>
      </Rules>
      </TTextCompareSession>
      </Items>
      </TSessionFolder>
      </BCSessions>

      with this (red marked elements) it seems to do a rule-based folder compare. So I added it in my BCSessions.xml generator.
      But with the command line call it still doesn't work.

      Here is my foldercompare skript:

      criteria rules-based ignore-unimportant

      load "path1" "path2"

      folder-report layout:xml &
      options:display-mismatches-no-orphans &
      output-to:"path3"


      edit: Graphical works, command line doesn't

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16000

        #4
        Hello,

        Is your install a Portable Install? Is there a BCState.xml and BCSessions.xml within the single directory with BCompare.exe? This is needed for the command line to use the same settings regardless of which user account is running the script.

        Otherwise, the script must run as the same Windows User account that the graphical interface uses. Generally, if you are having trouble, setting up a Portable Install is a good way to troubleshoot this.
        Aaron P Scooter Software

        Comment

        • phil
          Journeyman
          • Mar 2015
          • 19

          #5
          Yes the BCState.xml and BCSessions.xml are in the BC main directory (like the BCompare.exe).

          Normally the folder compare doesn't use the Textcompare ignore rules, am I right with that?
          So I set the "Foldercompare > compare > compare content > rule based compare for the session defaults" to get the folder compare work with textcompare rule settings, as I mentioned earlier.

          Result > Folder Compare doesn't uses the Textcompare rule settings (in the BCSessions.xml) and throws many differences (because every file has another date).

          Btw I am testing with a logged on user to avoid "not logged on user problems".

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 16000

            #6
            Correct, however your script was set to criteria rules-based, which should then use the default session settings for a rules-based scan. And your previously attached BCSessions.xml above has the Text Compare defaults configured correctly. On my own system, your script ignores a simple date text (01.01.1911) as the only difference in the file when generating a report. Are any of your files in subfolders? If so, you need to issue an expand all first:
            criteria rules-based ignore-unimportant
            load "path1" "path2"
            expand all
            folder-report layout:xml &
            options:display-mismatches-no-orphans &
            output-to:"path3"

            If you are still having trouble, I would suggest emailing us at [email protected] with:
            1) a link back to this forum thread
            2) your current BCSupport.zip from the Help menu -> Support; Export
            3) a pair of zip files that have two small sample folders which I can use for path 1 and path 2.

            This way, I can recreate exactly what you have and try to track down what configuration may be getting in the way.
            Aaron P Scooter Software

            Comment

            Working...