Announcement

Collapse
No announcement yet.

Command Line Folder Compare error

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Command Line Folder Compare error

    Hi All, I'm new to the forum and new to Beyond Compare.

    We are running BC vs. 3 and I am trying to write a script that uses a window shell and executes a BC command line folder compare. A file compare was successfully written this way and I am simply trying to modify that code but I have been unsuccessful and am getting an Unexpected Argument error in the script that points to folder1 (left folder).

    The script is:
    folder-report layout:summary options:display-mismatches title:"Folder Comparison Report" output-to:%3 output-options:html-color %1 %2

    The shell to execute the command line is:
    Set oExec = WshShell.Exec(C:\Progra~1\Beyond~1\BCompare @C:\Beyond~1\FiServMasterImageFiles\AreThereFolder DifferencesScript.txt C:\BeyondCompare\BeyondComparetestfiles\testfolder 1 C:\BeyondCompare\BeyondComparetestfiles\testfolder 2 \\Cxxxxx\k_regression\RegressionTestResults\FGFE0P AC.txt)

    I've tried just taking just the command line and running it outside of the script and shell and I get the same error.

    The Log shows:
    12/8/2009 1:17:35 PM >> folder-report layout:summary options:display-mismatches title:"Folder Comparison Report" output-to:\\Cxxxxx\k_regression\Regression output-options:html-color C:\BeyondCompare\BeyondComparetestfiles\testfolder 1 C:\BeyondCompare\BeyondComparetestfiles\testfolder 2
    12/8/2009 1:17:35 PM Fatal Scripting Error: Unexpected argument(s) "C:\BeyondCompare\BeyondComparetestfiles\testfolde r1"
    12/8/2009 1:17:42 PM Script completed in 7.11 seconds

    All I need to do is execute a command line folder compare of two folders and produce a results report.

    Any help is much appreciated!

  • #2
    Hi LBA,

    have you tried to put the paths in quotes?

    Code:
    "%1" "%2"
    
    and
    
    "C:\BeyondCompare\BeyondComparetestfiles\testfolder 1"
    "C:\BeyondCompare\BeyondComparetestfiles\testfolder 2"
    Hope this helps

    Bye
    Christoph

    Comment


    • #3
      Hi LBA,

      The syntax for a folder-compare is different than for file compares, you'll need to use a load command to specify the folders to compare. Here's an example script:

      load %1 %2
      expand all
      folder-report layout:summary options:display-mismatches title:"Folder Comparison Report" output-to:%3 output-options:html-color
      Chris K Scooter Software

      Comment


      • #4
        That fixed the problem and all is working now. Thank you!!!!

        Comment

        Working...
        X