No announcement yet.

Calling a Beyond Compare script using Variables

  • Filter
  • Time
  • Show
Clear All
new posts

  • Calling a Beyond Compare script using Variables

    I've got a batch script that uses variables to recursivly navigate through a series of directories. After navigating to each directory, I would like to call beyond compare using a script to compare the directories. Beyond Compare seems to have problems with the fact that the script is called using variable values.

    Below is the command I have in the batch script:

    bc2 @a_cmp.txt x:\output\%%i\%%m\%%j x:\verified\%%m\%%j

    where %%i, %%m, and %%j represent different folder variables that are set earlier on in the script. a_cmp.txt contains the following syntax:

    load %1 %2
    expand all
    select all
    folder-report layout:summary options:display-mismatches output-to:report.txt

    When I run the command line script, the directory variables are being set correctly (verified using ECHO commands), but when the batch script goes to call Beyond Compare, I receive an error that reads "Unable to load base folder". Can a Beyond Compare script be called using parameters that contain variable values?

    Let me know if there is any additional information I need to provide...Thanks for the help.

  • #2
    Re: Calling a Beyond Compare script using Variable

    I just tested a simple example, and this should work.

    It might help to place quotes around the paths in case some of them contain spaces.

    bc2 @a_cmp.txt "x:\output\%%i\%%m\%%j" "x:\verified\%%m\%%j"

    Also, try adding the command:

    log append:bclog.txt

    To the beginning of your script. This way you can look at the log file if it fails again to verify what path BC is using with the load command.
    Chris K Scooter Software