INI file comparison

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dummzeuch
    Visitor
    • Jun 2014
    • 7

    INI file comparison

    I would have thought that this topic has already been discussed to death, but oddly the search function did not turn up anything.

    I have written a tool that re-sorts an INI file based on a template so they can be compared much more meaningful than unsorted or alphabetically sorted INI files. Basically, it would need to be called like

    mytool [templatefile] [inputfile] [outputfile]

    in the terms of a Beyond Compare conversion utility, where you want to see an older version on the left, the current version the right, have the older version sorted so it matches the current version closely and also want to be able to edit the current version, that would mean it should be called for the left file only like this:

    mytool [rightfile] [leftfile] [outputfile]

    I can't figure out whether this is currently possible, it probably isn't, is it?
  • Aaron
    Team Scooter
    • Oct 2007
    • 15997

    #2
    Hello,

    Our File Format's can have an External Conversion applied which accept %s as the current source file, and then output to %t which is the temp text file that is displayed. You would need to have a set template file that you alter or edit externally, as we don't have a variable definition for it. In order to use multiple, you could create multiple New File Formats, each using a different template, then when in the Text Compare load the specific format with the template you need.

    We have an example Kb article here:
    http://www.scootersoftware.com/suppo...rnalconversion
    Aaron P Scooter Software

    Comment

    • dummzeuch
      Visitor
      • Jun 2014
      • 7

      #3
      Originally posted by Aaron
      Our File Format's can have an External Conversion applied which accept %s as the current source file, and then output to %t which is the temp text file that is displayed. You would need to have a set template file that you alter or edit externally, as we don't have a variable definition for it. In order to use multiple, you could create multiple New File Formats, each using a different template, then when in the Text Compare load the specific format with the template you need.
      I was aware of this functionality, but what I wanted to do was resorting the second file, using the first file as template. I think that's not possible because I can't pass the file name of the first file to the conversion of the second file, can I?

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 15997

        #4
        No, the conversion is separate and runs 'twice' (once for each side).

        You would want to have a common template, then sort both files (and all future INI files) using the same template. You could have a more complicated parent script, like a bat file, that takes in the source, and references other locations, but these would need to be setup externally to BC3.
        Aaron P Scooter Software

        Comment

        • bovirus
          New User
          • Jan 2015
          • 1

          #5
          @dummzeuch

          Where can I find your tool?

          Comment

          Working...