Announcement

Collapse
No announcement yet.

Unexpected argument(s) "" in scripted file compare

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

  • Unexpected argument(s) "" in scripted file compare

    I'm trying to run a scripted compare on linux (test box is Centos6 32 bit).

    I run the compare like this: bcompare @ucompare

    Here's the text of the script "ucompare":

    compare rules-based
    file-report &
    layout:side-by-side &
    options:ignore-unimportant, display-content, line-numbers &
    output-options:html-color &
    output-to:mytest-bcc.html &
    "0213/fileone.txt" "0218/filetwo.txt"

    If fails with:
    Fatal Scripting Error: Unexpected argument(s) ""

    I tried with and without quotes on the files. Ideas??

    I need to run this on linux...i had the script run fine in v2 on windows, but of course there were mods required...and i can't see any syntax error...and i'm supplying no arguments in executing it.

  • #2
    Hello,

    The invalid arguments are coming from part of the script itself. Order and syntax are a bit more strict in BC3, so you might need to rearrange things a little. For example, you will want to have output-to: before output-options. I would suggest looking in the Help file -> Using Beyond Compare -> Automating with Script, and the Scripting Reference chapter. You will also probably want to use the text-report main command instead of file-report if you assume text files and want to use options such as line numbers. You also want to use display-context instead of display-content. Unless you have a pair of folders, you do not need the compare line.

    text-report &
    layout:side-by-side &
    options:ignore-unimportant,display-context,line-numbers &
    output-to:"mytest-bcc.html" &
    output-options:html-color &
    "0213/fileone.txt" "0218/filetwo.txt"

    How does this work for you?
    Last edited by Aaron; 21-Feb-2013, 09:33 AM. Reason: Parsing error with spaces
    Aaron P Scooter Software

    Comment


    • #3
      Aaron,

      Well, I'm not a fan of that error message, it really misled me. But I'm a fan of your help. :-) You led me to the actual source of the issue. It's very picky as to spaces if an option has multiple values, i.e., there can't be space around the comma...I have it working now, THANK YOU!

      Comment


      • #4
        Thanks for the follow-up. "Parameters" is a bit unspecific, but in this case it was referring to the parameters of "options:". I'll update the sample script. Thanks for the feedback and we'll look into improving our error messaging.
        Aaron P Scooter Software

        Comment

        Working...
        X