Announcement

Collapse
No announcement yet.

Newbie sync script question

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

  • Newbie sync script question

    Hello,

    I'm totally newbie to Beyond Compare scripting and I would like to sync several local Mac folders to distant SFTP folders. So I wrote this text script file, a test with only one folder:
    Code:
    # Set the comparison criteria.
    criteria timestamp size
    
    # Load source and target folders.
    load "/Users/_ME_/PERSO/Développement/AppleScripts Perso/" "sftp://_MY_DISTANT_FOLDER/PERSO/Développement/AppleScripts Perso/"
    
    # Sync the local files to the web site, creating empty folders.
    sync visible mirror:left->right
    Connection to distant folder seems OK but the script failed, saying it was unable to load base folder, or "comparison". I have a french version of Beyond Compare, so I don't think it would be useful to post the log.

    Of course, path to the local folder is correct. Just to be sure, first parameter of "load" command has to be a path to a local folder?


    Another thing. If I'll be able to process thsi script, is it possible to perform another "load" command, or should I wait the first "load" is completed?

    Thanks for your help.

  • #2
    My bad, I was confused by the error message: path to distant folder was wrong.
    Script is now working fine.

    Comment


    • #3
      Hello,

      Great you got that working. For troubleshooting, if you copy and paste the text of the path you want to use (between the quotes) into BC4's Folder Compare, and paste into one side's location path and hit enter, this uses the same syntax and you can test loading the location outside of scripting. Alternatively, if you load the location in the interface, and copy and paste the path into script (Adding quotes around it for the script), this can transfer this direction, too.
      Aaron P Scooter Software

      Comment


      • #4
        In order to debug my first script, I splitted the load command like this:
        Code:
        load "_path to my local folder_"
        --> no error
        Code:
        load "_path to my FTP folder_"
        --> Beyond Compare throws the "base folder" error

        Comment


        • #5
          I found your other forum thread and it looks like you resolved the issue? Or is this a new issue?
          https://www.scootersoftware.com/vbul...ac-Applescript

          To troubleshoot, copy and paste the text between the quotes:
          _path to my FTP folder_

          into the graphical interface, new Folder Compare, into the Left or Right base folder location bar. Does this load or also throw an error? If you are able to post the text, I could look to see if there are any typos or syntax issues.
          Aaron P Scooter Software

          Comment


          • #6
            In fact, it was an older issue (my first attempt to perform a local to FTP backup) but all is working fine now.
            Thank you very much

            Comment

            Working...
            X