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. ⚠️

AppleScript - How can I create a `collection` with kind `catalog folder`?

Comments

11 comments

  • Walter Rowe
    Moderator
    Top Commenter

    In Script Editor open the Capture One Dictionary. I think you will find it is called a group vs catalog folder. You can learn a lot from the Capture One AppleScript dictionary. It’s very informative.

    0
  • Julius Krumbiegel

    Thank you for your response. I don't think that's correct, though, I only get three `group` kinds when I retrieve all collections with that kind. They're "Letzte Importe", "Letzte Aufnahmen", "Smart Albums".

    When I filter for `catalog folder` I get all the ones that I care about, looking like this in Capture One:

    I think Capture One might just not be able to create these programmatically, at least I can't find any information anywhere.

    ```

    tell application "Capture One"
        tell current document
            set _names to name of every collection whose kind is catalog folder
        end tell
    end tell

    ```

    0
  • Rick Allen

    I don't work with catalogs but can I try understand what you are trying to achieve. 

    Is the end result to synchronize the subfolders of the Bilder folder so that as new folders are added they are added to the catalog's Folders?

    Or are you trying to import each subfolder as a User collection?

     

     

    0
  • Julius Krumbiegel

    I import my images from camera into a temp folder on my macbook first, then later when I have time, I go through them and put them into folders according to their dates and events (something like 2024-12-24 Christmas or 2024-07-01-2024-07-22 Vacation). Currently, I have to manually go and make a folder via Finder, then go to Capture One and "add it" via the context menu of the browser so that it appears in the filesystem browser. Not all folders in the "Bilder" directory show up in Capture One, only those I added manually. So they're like a hybrid of collection and physical location on the harddrive in that way.

    I want to automate these folder creation and adding steps because they slow me down when I do a lot of categorization that has piled up.

    The reason I want to use these `catalog folder` type collections is that I want them reflected on the harddrive, I don't like to rely solely on Capture One catalog metadata in the form of albums for structure.

    These `catalog folder` collections are also the way that I later move images from my laptop to my NAS, I drag a date-event folder in the filesystem browser view from my laptop Pictures folder to a corresponding folder on the NAS, which moves the files physically as well as in Capture One. I couldn't do that if they were albums as albums have no storage location.

    I hope that clarifies the motivation.

    0
  • Walter Rowe
    Moderator
    Top Commenter

    You cannot make Capture One create disk folders. You have to tell Finder to create them via AppleScript, then tell Capture One to add them. You also may have to tell Finder to move the physical files via AppleScript and then tell Capture One to "Locate" them at their new location.

    I have a Capture One utility that moves images stored inside Capture One to date-based folders. It uses Finder for the file moves and tells Capture One to locate the files at their new location. You may be able to use this as a base for what you do with your temporary folder - move from the temp folder to date-based folders.

    Look at the 'managed-to-referenced' folder on this GitHub repository.

    https://github.com/walterrowe/capture-one-scripts

    0
  • Julius Krumbiegel

    You cannot make Capture One create disk folders. You have to tell Finder to create them via AppleScript, then tell Capture One to add them

    Right, the folders themselves I would've created via Finder, it is the "tell Capture One to add them" part that I had trouble with. But maybe your idea of moving the files myself, then locating them in Capture One again is the best I can do. I had hoped to give the move command in Capture One (moving into such a collection should move images on disk) so that the catalog state always stays correct.

    This is the critical line from your script, for others reading this later

    ```

    relink thisImage to path targetFile

    ```

    0
  • Walter Rowe
    Moderator
    Top Commenter

    Correct. I don't explicitly "add" the new folders. I relink files that I moved into those folders via Finder which then makes those folders appear in Capture One. Capture One knows about images. Folders are the by-product. What it interesting is that once a folder is known it remains known even if its becomes empty. You have to manually remove it.

    0
  • Rick Allen

    Can’t you set the synchronize settings for the parent folder (the bilder folder) to sync subfolders so that once the folders are created the catalog automatically ‘knows’ about the new folder and images?

    0
  • Julius Krumbiegel

    The images don't start out in the correct folders as Capture One is used to sort them in the first place. Also, not everything in the Bilder folder is meant to be loaded into Capture One, it's just a temporary location for the images until they go onto the NAS.

    0
  • Julius Krumbiegel

    This is what I ended up with https://gist.github.com/jkrumbiegel/33a489dcacab2da91ba3761c1a30cf2d which works exactly how I wanted it to, even if the mechanism is slightly different than what I envisioned at first. Thanks for your help!

    0
  • Walter Rowe
    Moderator
    Top Commenter

    Clean and simple. Well done!

    0

Post is closed for comments.