Skip to main content

⚠️ Please note that this topic or post has been archived. The information contained here may no longer be accurate or up-to-date. ⚠️

Adding Folder

Comments

5 comments

  • Eric Valk
    Its unclear if you are using a Session or a Catalog, and how you normally go about adding a folder. If you clarify this, you may get better answers.
    0
  • FL
    I am using catalogs and store my photos outside the catalog in directories named with dates. From within Capture One I often need to add additional subfolders (on the hard disk). I do this using "add folder" and then "new folder" and "add". So I generate the subfolders from within Capture One but this can only be done one at a time whereas I need sometimes 10 or more.

    Best
    Frank
    0
  • Eric Valk
    Empty sub folders generated by Capture One - should be no issue- with an xxx01, xxx02, xxx03 pattern?
    0
  • FL
    Indeed, i.e. for focus stacks which are stored in individual folders on the memory card I use something like fs_1..fs_x, same for panos (pano_1...pano_n).
    0
  • Eric Valk
    Generating empty folders is something best done without using Capture One.

    I made a slight modification to my handler findTargetFolder() to make a starting point for your script.

    Once you put image files in the folders, if you import the image files into Capture One then Capture One will automatically show the folders.


    use AppleScript version "2.4" -- Yosemite (10.10) or later
    use scripting additions

    set debug to true -- or false, once verified
    set alias2TopParent_a to alias (((get path to desktop) as text) & "DPR:") -- alias of the top parent folder
    set alias2Parent_a to choose folder with prompt "Select Parent Folder" default location alias2TopParent_a
    ## Use display dialog to enter the number of subfolders and what they are called
    set alias2CoScriptPrefs_a to findTargetFolder(alias2Parent_a, "Prefs1", debug)

    on findTargetFolder(targetFolderParent_a, targetFolderName, debug)
    ## Return a reference to a folder. If the folder doesn't exist, create it.
    ## modify this handler to include the root name of the folder, the number of folders and the starting number
    local targetFolderParent_p, targetFolder_p, targetFolder_a, newFolderRef
    set targetFolderParent_p to get POSIX path of targetFolderParent_a

    ## Put a repeat loop here to g1) generate the alias for the subfolder, 2) create it if it doesn't exist
    set targetFolder_p to (targetFolderParent_p & targetFolderName)
    if debug then log " Initializing Folder "" & targetFolder_p & """

    try
    set targetFolder_a to (get alias POSIX file targetFolder_p)
    if debug then log "Folder " & targetFolder_p & " Exists"
    on error
    tell application "Finder" to set newFolderRef to make new folder at targetFolderParent_a with properties {name:targetFolderName}
    set targetFolder_a to newFolderRef as alias
    if debug then log targetFolder_p & " Created"
    end try
    return targetFolder_a
    end findTargetFolder


    --choose folder
    --choose folder (verb)Choose a folder on a disk or server (from the User Interaction suite, defined in StandardAdditions.osax)
    --FUNCTION SYNTAX
    --set theResult to choose folder with prompt text ¬
    -- default location alias ¬
    -- invisibles boolean ¬
    -- multiple selections allowed boolean ¬
    -- showing package contents boolean
    --RESULT
    --alias the chosen folder
    --PARAMETERS
    --Parameter Required Type Description
    --default location optional alias the default folder location
    --invisibles optional boolean Show invisible files and folders? (default is false)
    --multiple selections allowed optional boolean Allow multiple items to be selected? (default is false)
    --showing package contents optional boolean Show the contents of packages? (Packages will be treated as folders. Default is false.)
    --with prompt optional text the prompt to be displayed in the dialog box
    0

Post is closed for comments.