Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2015
    Posts
    2

    Default Change base folder

    Hi,

    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.

    Regards.

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,949

    Default

    Hello,

    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. #3
    Join Date
    Feb 2015
    Posts
    2

    Default

    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).

    Regards.

  4. #4
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,949

    Default

    Hello,

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •