Create File Comparison Report

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • efrenkel2357
    Visitor
    • Feb 2013
    • 8

    Create File Comparison Report

    I am running a script that compare two files and generates a report.
    Every time i run I get this error:

    2/8/2013 3:01:28 PM >> text-report &
    2/8/2013 3:01:28 PM >> layout:side-by-side &
    2/8/2013 3:01:28 PM >> options:ignore-unimportant,display-context &
    2/8/2013 3:01:28 PM >> output-to:C:\Users\frenkel\Desktop\Test.html C:\Users\frenkel\Desktop\File1.txt C:\Users\frenkel\Desktop\File2.txt
    2/8/2013 3:01:28 PM Fatal Scripting Error: Unable to create report: Error Opening File
    2/8/2013 3:01:33 PM Script completed in 5 seconds

    I call the script from the command line like this:
    bcompare.exe "@C:\Users\frenkel\Desktop\CompareTestSummaryResul ts.txt" "C:\Users\frenkel\Desktop\File1.txt" "C:\Users\frenkel\Desktop\File2.txt" "C:\Users\frenkel\Desktop\Test.html"
    Last edited by efrenkel2357; 08-Feb-2013, 05:22 PM.
  • Aaron
    Team Scooter
    • Oct 2007
    • 16017

    #2
    Hello,

    Would you be able to attach the script as a CompareTestSummaryResults.txt as a file? The script log looks ok, but there might be a subtle whitespace difference that I am missing. If we can run your exact script file, we should be able to determine if and where there is a small syntax issue.

    Update: Sorry about that. I see the current attachment is exactly what I needed. And it, itself, seems fine. Is the script running as frenkel? I would try a simple test case in c:\temp\ instead, just in case it is a permissions issue.

    Also, you might want to put quotes around "%3" "%1" "%2", just in case there is whitespace in those file paths in the future.
    Last edited by Aaron; 08-Feb-2013, 05:22 PM. Reason: Update
    Aaron P Scooter Software

    Comment

    • efrenkel2357
      Visitor
      • Feb 2013
      • 8

      #3
      Even with the quotes around the %1/%2/%3 I still get the same error:

      2/8/2013 3:30:15 PM >> text-report &
      2/8/2013 3:30:15 PM >> layout:side-by-side &
      2/8/2013 3:30:15 PM >> options:ignore-unimportant,display-context &
      2/8/2013 3:30:15 PM >> output-to:"C:\Users\frenkel\Desktop\Test.html" "C:\Users\frenkel\Desktop\File1.txt" "C:\Users\frenkel\Desktop\File2.txt"
      2/8/2013 3:30:15 PM Fatal Scripting Error: Unable to create report: Error Opening File
      2/8/2013 3:30:16 PM Script completed in 1 seconds

      Comment

      • efrenkel2357
        Visitor
        • Feb 2013
        • 8

        #4
        I am user frenkel and I am an administrator. I ran almost an identical script when I was using BC2

        Comment

        • efrenkel2357
          Visitor
          • Feb 2013
          • 8

          #5
          Just to be sure its not a permission issue I changed the path and still got the same error:

          2/8/2013 3:35:24 PM >> text-report &
          2/8/2013 3:35:24 PM >> layout:side-by-side &
          2/8/2013 3:35:24 PM >> options:ignore-unimportant,display-context &
          2/8/2013 3:35:24 PM >> output-to:"C:\Test\Test.html" "C:\Test\File1.txt" "C:\Test\File2.txt"
          2/8/2013 3:35:24 PM Fatal Scripting Error: Unable to create report: Error Opening File
          2/8/2013 3:35:26 PM Script completed in 2 seconds

          Comment

          • chrroe
            Pooh-Bah
            • Oct 2007
            • 588

            #6
            Hello efrenkel,

            in situations like this I always recommend to use the great Process Monitor from Sysinternals.

            Set the filters to only show file acticities from BCompare.exe and look for the error.
            Maybe this helps to track down the problem ...


            Bye
            Christoph

            Comment

            • efrenkel2357
              Visitor
              • Feb 2013
              • 8

              #7
              Hi Christoph,

              I should also mention that I am using the evaluation version and that its a windows 7 machine. I will try Sysinternals.

              Thanks!

              Comment

              • efrenkel2357
                Visitor
                • Feb 2013
                • 8

                #8
                Some information from Sysinternals:

                8:57:16.0520050 AM BCompare.exe 7956 QueryDirectory C:\Users\frenkel\Desktop\Test\File1.txt NO SUCH FILE Filter: File1.txt
                8:57:16.0521368 AM BCompare.exe 7956 QueryDirectory C:\Users\frenkel\Desktop\Test\File1.txt NO SUCH FILE Filter: File1.txt
                8:57:16.0522423 AM BCompare.exe 7956 CreateFile C:\Users\frenkel\Desktop\Test\File1.txt NAME NOT FOUND Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a


                8:57:16.0528995 AM BCompare.exe 7956 QueryDirectory C:\Users\frenkel\Desktop\Test\File2.txt NO SUCH FILE Filter: File2.txt
                8:57:16.0530235 AM BCompare.exe 7956 QueryDirectory C:\Users\frenkel\Desktop\Test\File2.txt NO SUCH FILE Filter: File2.txt
                8:57:16.0531241 AM BCompare.exe 7956 CreateFile C:\Users\frenkel\Desktop\Test\File2.txt NAME NOT FOUND Desired Access: Read Data/List Directory, Synchronize, Disposition: Open, Options: Directory, Synchronous IO Non-Alert, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a


                However those files DO exists in that directory and they DO have read/write permissions.
                I can generate the Beyond Compare html report with those two files if if I do it through the GUI.

                Comment

                • Aaron
                  Team Scooter
                  • Oct 2007
                  • 16017

                  #9
                  If you have any extra security or antivirus software, you may also wish to temporarily disable it as a quick test to see if that helps.
                  Aaron P Scooter Software

                  Comment

                  • Aaron
                    Team Scooter
                    • Oct 2007
                    • 16017

                    #10
                    In addition to my comments about extra security or antivirus software:

                    Instead of script, does it work if you pass the two file paths on the command line to launch a Text Compare?:
                    bcompare.exe "c:\temp\file1.txt" "c:\temp\file2.txt"

                    Are you triggering the script call from your Windows Command Line, or another script or scheduled task?
                    Aaron P Scooter Software

                    Comment

                    • efrenkel2357
                      Visitor
                      • Feb 2013
                      • 8

                      #11
                      I was triggering it from another script. However, it did not work either if called from the command line.
                      I uninstalled, restarted computer, installed again, restarted computer. Ran everything as it was and it worked without error.

                      Comment

                      • Aaron
                        Team Scooter
                        • Oct 2007
                        • 16017

                        #12
                        And you had restarted previously? That's interesting that it cleared up with an uninstall/reinstall. If you have any other issues crop up, please let us know.
                        Aaron P Scooter Software

                        Comment

                        • efrenkel2357
                          Visitor
                          • Feb 2013
                          • 8

                          #13
                          This is what I did originally:
                          Uninstalled BC2
                          did NOT restart computer
                          Install BC3
                          Did not restart computer

                          tried to run the same script that worked with BC2 with BC3.

                          Comment

                          Working...