Beyond Compare 4 and Applescript

86 views Asked by At

I know I can use Applescript to execute a Beyond Compare 4 script with:

do shell script "/usr/local/bin/bcompare @\"/Volumes/SSD/My_BeyondCompare_Script.txt\""

This script actually contains something like:

criteria timestamp binary
load "/Users/.../_path_to_my_local_folder" "sftp://_path_to_my_sftp_folder"
sync visible mirror:left->right

Is it possible to write the contents of this script directly in the Applescript, without having this text file? I'm not familiar with "do shell script" stuff.

1

There are 1 answers

0
Zax On

From Aaron, of Scooter Software:

BC4 needs the command line "bcompare @script.txt" detected in order to execute in scripting mode.

BC4's command line does support passing arguments into scripting, so the text file can be more static, while passing in the parameters (usually paths): bcompare @script.txt "/Users/.../_path_to_my_local_folder" "sftp://_path_to_my_sftp_folder"

where script.txt then uses: criteria timestamp binary load "%1" "%2"