Selecting all files in a folder tree

Comments

8 comments

  • ericnepean
    Assuming your tree is inside a Project, selecting (by clicking on) the project in the Library will show every image in the tree, and only those images and their variants. (no need for a smart album for this task)

    You may want to disable the viewer so that the browser shows more images.

    Selecting all the images in the browser will select all the images in tree. The command-A key stroke will do it.
    0
    Comment actions Permalink
  • David Edge
    Thanks Eric - but my problem is getting them inside the project in the first place...
    0
    Comment actions Permalink
  • Ian Wilson
    [quote="David Edge" wrote:
    Thanks Eric - but my problem is getting them inside the project in the first place...

    Are they already in the catalog? If not, you can import them all in one go. Use the import dialog box, select the source as the top of the tree, and make sure to check the include subfolders box.

    Ian
    0
    Comment actions Permalink
  • David Edge
    Hi Ian

    They are all in the catalogue. I was looking for a trick to select everything in a sub-tree. Maybe the best I can do is export the lot to another catalogue, add a keyword and reimport. Or just do that manually within the catalogue. But it seems an irritating restriction.
    0
    Comment actions Permalink
  • ericnepean
    [quote="David Edge" wrote:
    Hi Ian

    They are all in the catalogue. I was looking for a trick to select everything in a sub-tree. Maybe the best I can do is export the lot to another catalogue, add a keyword and reimport. Or just do that manually within the catalogue. But it seems an irritating restriction.

    You have used precise language, and no one has noticed (including me)
    Your images are in an OSX folder tree, visible in Finder but also in the Folder section of the Capture One Library.

    How I would do this depends on the number of folders.

    If the number of folders is relatively small, in Capture One, with the Library Tool, select each folder, in each folder select all images. The either assign a colour tag to all the images, or drag them to the album in the project you set up for this purpose.

    Using the colour tag approach, after tagging images in all the folders, back to All Images, filter on the colour tag, select all images, drag them to the album in the project you set up for this purpose. Finally remove the colour tag.
    0
    Comment actions Permalink
  • David Edge
    Thank Eric

    So no shortcut - but in this case it's doable and in future I will add a keyword of colour tag so I can do this.

    cheers

    d.
    0
    Comment actions Permalink
  • ericnepean
    [quote="David Edge" wrote:
    Thank Eric

    So no shortcut - but in this case it's doable and in future I will add a keyword of colour tag so I can do this.

    cheers

    d.

    In case you're interested, It would be very simple to write an AppleScript that would copy every variant in the selected folder tree to some Project in User Collections.

    It would take me about 30minutes to write and test, but you would have to learn how to run an Applescript.
    0
    Comment actions Permalink
  • ericnepean
    [quote="David Edge" wrote:
    Thank Eric

    So no shortcut - but in this case it's doable and in future I will add a keyword of colour tag so I can do this.

    cheers

    d.

    I decided that I wanted to have this myself. Here is an Applescript that will copy all variants in a folder tree to a Project user collection with the same name.


    use AppleScript version "2.4" -- Yosemite (10.10) or later
    use scripting additions
    ## In Capture One select a Catalog Folder which is the top of a folder tree, then run this script.
    ## All the Images in the folder tree and their variants will be added to an Album inside a Project named after the selected Catalog Folder

    tell application "Capture One 12" to tell current document
    set {collName, collKind, collRef, collID} to {name, kind, it, id} of current collection
    if catalog folder ≠ collKind then error collName & " is not a Catalog Folder"
    end tell

    set nameResultProject to "FolderTree:" & collName
    set nameResultAlbumRoot to "TreeContents"

    tell application "Capture One 12" to tell current document
    if not (exists collection named (get nameResultProject)) then
    set ref2ResultProject to make new collection with properties {kind:project, name:nameResultProject}
    else
    if (project = (kind of (get collection named nameResultProject))) then
    set ref2ResultProject to collection named nameResultProject
    else
    error ("A user collection named "" & nameResultProject & "" already exists, and it is not a project.")
    end if
    end if
    end tell

    set {coll_ctr, collSuffix, albumCreated} to {0, "", false}
    set nameResultAlbum to nameResultAlbumRoot & "_" & (get short date string of (get current date))
    repeat 99 times
    tell application "Capture One 12" to tell ref2ResultProject
    if not (exists collection named (get nameResultAlbum & collSuffix)) then
    set nameResultAlbum to (get nameResultAlbum & collSuffix)
    set ref2ResultAlbum to make new collection with properties {kind:album, name:nameResultAlbum}
    set albumCreated to true
    exit repeat
    else
    set coll_ctr to coll_ctr + 1
    set collSuffix to "_" & coll_ctr
    end if
    end tell
    end repeat
    if not albumCreated then error "Unable to create an Album starting with " & nameResultAlbum

    collectTree(collID, ref2ResultAlbum)



    on collectTree(thisCollId, ref2ResultAlbum)
    local collIdList, aSubCollID, theSubCollID
    tell application "Capture One 12" to tell current document to tell collection id thisCollId
    try
    add inside ref2ResultAlbum variants (its variants)
    on error errmess
    log errmess
    end try
    try
    set collIdList to its collection's id
    repeat with aSubCollID in collIdList
    set theSubCollID to "" & aSubCollID
    my collectTree(theSubCollID, ref2ResultAlbum)
    end repeat
    on error errmess
    log errmess
    end try
    end tell
    end collectTree
    0
    Comment actions Permalink

Please sign in to leave a comment.