Folder/File comparison problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gromit
    Visitor
    • Jan 2008
    • 3

    Folder/File comparison problems

    Hello,

    I try to generate reports of files, which are located in two folders (plus subfolders). I have written the following script:
    log verbose c:\log.log
    load "C:\BC-compare-folders\SDHS-1.0" "C:\BC-compare-folders\NIS-2.0"
    expand all
    select all.files
    file-report layout:side-by-side &
    options:ignore-unimportant,display-context &
    output-to:"C:\BC-tmp\result.txt" &
    output-options:html-color

    the script is invoked by executing the BC.CMD file, which contains:
    "C:\Program Files\Beyond Compare 2\BC2.exe" @C:\BC\BC-all.script

    As result I get the following output:
    03.01.2008 12:32:18 Beyond Compare Version 2.5.2 (build 252)
    03.01.2008 12:32:18 Exception occurred at: 00011BB6
    03.01.2008 12:32:18 System Error. Code: 87.
    03.01.2008 12:32:18 The parameter is incorrect
    03.01.2008 12:32:18 Script completed in 0,14 seconds

    What do I wrong in the script?

    Thanks in advance,

    Christian
  • Aaron
    Team Scooter
    • Oct 2007
    • 16000

    #2
    Re: Folder/File comparison problems

    I ran your script on a set of test files and it seems fine. If you run it on a different set of folders, with a couple of files, does it work for you?

    Is it possible that some of your file names or specific files are giving you issues?
    Aaron P Scooter Software

    Comment

    • Gromit
      Visitor
      • Jan 2008
      • 3

      #3
      Re: Folder/File comparison problems

      I changed in the script now the line of loding folders to a single folder
      load "C:\BC-compare-folders\SDHS-1.0\include\NISsrv\ADMH" "C:\BC-compare-folders\NIS-2.0\include\NISsrv\ADMH",
      which contains *.H files (three of them in each folder) in both of them.Now I get the following log:
      03.01.2008 19:09:05 Load Comparison: C:\BC-compare-folders\SDHS-1.0\include\NISsrv\ADMH <-> C:\BC-compare-folders\NIS-2.0\include\NISsrv\ADMH
      03.01.2008 19:09:05 >> expand all
      03.01.2008 19:09:05 >> select all.files
      03.01.2008 19:09:05 >> file-report layout:side-by-side & options:ignore-unimportant,display-context & output-to:"C:\BC-tmp\result.html" & output-options:html-color
      03.01.2008 19:09:05 Script Error: Incorrect parameters
      03.01.2008 19:09:10 >> User Canceled
      03.01.2008 19:09:10 Script completed in 5,05 seconds

      Christian

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16000

        #4
        Re: Folder/File comparison problems

        What if you perform the script on your own created folders, with simple text files, with alphanumeric names?

        Do your file names contain any odd characters? If you load the program in the GUI, can you manually perform this action?
        Aaron P Scooter Software

        Comment

        • Gromit
          Visitor
          • Jan 2008
          • 3

          #5
          Re: Folder/File comparison problems

          Aaron I can do the comparisons with the GUI, but not with the script. I sent you a PM.

          Comment

          • yurdi
            Visitor
            • May 2007
            • 3

            #6
            Re: Folder/File comparison problems

            I have SImilar problem and i need help i can use my script to export result in TXT or xml but can't make it work in HTML.. help plz

            #set up basic comparison features
            criteria rules-based
            #filter out log files
            filter "*.txt;*.rof,*.xml"
            #load comparison
            load %LEFT_FOLDER% %RIGHT_FOLDER%
            expand all
            select all
            #generate a report of the differences
            file-report layoutver-under options:ignore-unimportant,display-mismatches output-to:%REPORT_FILE%
            file-report layout:xml options:ignore-unimportant,display-mismatches output-to:%REPORT_FILE_XML%
            file-report layout:side-by-side options:ignore-unimportant,display-mismatches output-to:%REPORT_FILE_html%

            Comment

            • Chris
              Team Scooter
              • Oct 2007
              • 5538

              #7
              Re: Folder/File comparison problems

              Hello Yurdi,

              First, change the comma in the filter command to a semicolon to separate filter items.

              Next, to output to html, you need to use "output-options:html-color" with the file-report command to get html output.

              Code:
              criteria rules-based
              filter "*.txt;*.rof;*.xml"
              load %LEFT_FOLDER% %RIGHT_FOLDER%
              expand all
              select all
              file-report layout:over-under options:ignore-unimportant,display-mismatches output-to:%REPORT_FILE%
              file-report layout:xml options:ignore-unimportant,display-mismatches output-to:%REPORT_FILE_XML%
              file-report layout:side-by-side options:ignore-unimportant,display-mismatches output-to:%REPORT_FILE_html% output-options:html-color
              Chris K Scooter Software

              Comment

              • yurdi
                Visitor
                • May 2007
                • 3

                #8
                Re: Folder/File comparison problems

                Hi Chris,

                Thanks for so fast answer, but i have question why in my html file i see match file and mismaches since i use :file-report layout:side-by-side options:ignore-unimportant,display-mismatches output-to:%REPORT_FILE_html% output-options:html-color i think i should not see those matching files?

                I would like to have result like : result from GUI link.

                But my script give me result like : result from script link.

                Result from gui Script result

                Sorry for those 2 links but i think would be more easy to understand what i realy want with some image.

                any help would be apprecited

                Yurdi.

                Comment

                • Chris
                  Team Scooter
                  • Oct 2007
                  • 5538

                  #9
                  Re: Folder/File comparison problems

                  Yurdi,

                  Thank you for the screen shots. This is happening because the script is using "select all". If you change the select command to only select different files, you won't get the names of matching files listed in the report.

                  Code:
                  criteria rules-based
                  filter "*.txt;*.rof;*.xml"
                  load %LEFT_FOLDER% %RIGHT_FOLDER%
                  expand all
                  select diff.files
                  file-report layout:over-under options:ignore-unimportant,display-mismatches output-to:%REPORT_FILE%
                  file-report layout:xml options:ignore-unimportant,display-mismatches output-to:%REPORT_FILE_XML%
                  file-report layout:side-by-side options:ignore-unimportant,display-mismatches output-to:%REPORT_FILE_html% output-options:html-color
                  Chris K Scooter Software

                  Comment

                  Working...