Command Line and Amazon S3

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • the1gadget
    Visitor
    • Apr 2009
    • 8

    Command Line and Amazon S3

    Hi All

    I am sure I am missing something simple here, because I just cant get it to work.
    I have an Amazon S3 profile. which works as I can use it from GUI.
    The profile is called S3_Customer1_FirmWare and is in the root.

    All I want to do is automate it with a command line.

    I have a script file (called Customer1_S3.bc4) that looks like this
    ==============================8<================== ============
    # This BC3 script looks at Customer 1 S3 and downloads the files we need

    criteria size
    log normal "D:\Applications\Customer1\BC4Script\logs\History. log"
    load S3_Customer1_FirmWare
    sync create-empty update:rt->lt

    ==============================8<================== ============

    This is called using

    C:\Progra~2\Beyond~1\BCompare.exe Customer1_S3.bc4

    The output log looks like

    ==============================8<================== ============
    20/03/2018 11:09:26 >>
    20/03/2018 11:09:26 >> log normal "D:\Applications\Customer1\BC4Script\logs\History. log"
    20/03/2018 11:09:26 >>
    20/03/2018 11:09:26 >> load S3_Customer1_FirmWare
    20/03/2018 11:09:26 Load comparison: <->
    20/03/2018 11:09:26 Fatal Scripting Error: Unable to load base folder
    20/03/2018 11:09:30 Script completed in 3.67 seconds

    ==============================8<================== ============

    It is like it can't find the name.
    --
    David
  • Aaron
    Team Scooter
    • Oct 2007
    • 16000

    #2
    Hello,

    Correct, it looks like the base folder Load isn't finding the session. Since BC4 stores settings per Windows User account, my hunch is that the automated task is running as a different user (and has different saved sessions) than the script user.

    By default, settings are stored per user in their %AppData% folder.

    You can make sure the user is the same as script or, sometimes useful, create a separate Portable Install (using our setup.exe) that is specifically configured for this script. Since a portable install is designed as a single directory install, the script or any graphical users all share the same settings in the single directory. If needed, you can launch your main BC4 install, and use the Tools menu -> Export to fetch a copy of your settings, and then launch the Portable install, and use the Tools menu -> Import to bring them in. Then verify in the graphical interface, and update your script calls to point to this bcompare.exe.
    Aaron P Scooter Software

    Comment

    • the1gadget
      Visitor
      • Apr 2009
      • 8

      #3
      Thanks Aaron.
      I am just trying to run it from a command line at the moment so it is the same user.
      So still a bit confused, however I am sure the above info will be useful once I work out where I am going wrong.

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16000

        #4
        From the log, it looks like the Load command cannot find the session name. There may be a typo in the session name, or the current command line (for some reason) is unable to access those settings. If you launch just "bcompare" instead of "bcompare @script", and load into the graphical interface, is the session name listed and can you load it with a double click?
        Aaron P Scooter Software

        Comment

        • the1gadget
          Visitor
          • Apr 2009
          • 8

          #5
          Yes I can load from the GUI.
          I have even copied the name from the GUI and into the batch file.
          I think I will put this in as a support request then I can give more info.

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 16000

            #6
            You can email us at [email protected]

            I'd also recommend trying the Portable Install (with Imported settings) to see if that just works, since you'd likely want to switch to that method for a scripted solution anyway given the issues you are already running into.
            Aaron P Scooter Software

            Comment

            • the1gadget
              Visitor
              • Apr 2009
              • 8

              #7
              Hi Aaron

              After almost a month I have just got back to this, and as I said in my first posting.

              "I am sure I am missing something simple here, because I just cant get it to work."

              It was something simple. Another developer had installed BC3 and my batch file was picking that up and not BC4 which had the profile in it.

              Thanks for all your help.
              --
              David

              Comment

              Working...