No announcement yet.

Change base folder

  • Filter
  • Time
  • Show
Clear All
new posts

  • Change base folder


    Is there a way to change a base folder (left or right) in the middle of script?

    The idea behind is that I'd like to load a whole session and then change the right folder before doing a sync.

    This could be useful to use the UI to define a session for backups and then use the same session in order to backup to different locations with scripts.

    Thanks in advance for your help.


  • #2

    Yes, script is a series of sequential commands, so you can:
    log verbose "c:\bclog.txt"
    load "Session Name"
    load "c:\folder1" "c:\folder2"
    expand all
    folder-report ....

    to load a session with its currently configured session settings (comparison, folders, etc), then load folder1 and folder2 into this session, replacing the current folders.

    Note: the load session command would load the session and if it has folders it would perform the background content scan on them. For a workflow like this, you would use a blank session, that only contains the configured Session Settings (filters, comparison, etc), but no folders, then load the custom pair of folders as the next script line.

    Also, you will need to load both folders (load "left" "right") in order to load the comparison. We do not support replacing only one or the other side.
    Aaron P Scooter Software


    • #3
      Hi Aaron,

      Thanks a lot for your reply and explanations.

      I understand now. I was a bit confused by the documentation where I saw this:

      load [create: (all|left|right)] <left path> [<right path>]

      I though I could write something like:
      load right "C:\Temp"
      but that doesn't work (it says Fatal Scripting Error: Unable to load base folder).



      • #4

        No problem. The create option is similar to the graphical interface when you attempt to load a location that doesn't exist, we prompt if you'd like to Retry or Create it. This option sets Yes to Create on Both or a specific side for scripts. This is useful if you are passing in a parameter for a new folder, or we also accept typing in a file path to a non-existent .zip (which we can then create).
        Aaron P Scooter Software