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

Copy Filename to "Title" Metadata Field

Comments

13 comments

  • Eric Valk
    A simple Applescript will do it. Are you comfortable running Applescript? If so, we should move this conversation to the Scripting forum.
    0
  • NN635261809663419495UL
    I have never run AppleScript but am more than happy to learn if it will help. I’m sure with the proper guidance I can figure it out. Thanks!
    0
  • Eric Valk
    @Jim_DK Can you move this thread to the scripting forum, please
    0
  • Eric Valk
    This Applescript below should do the job on every variant in the user collection you have selected (which is currently shown in the window). I've tested it and it works.

    The posting at this link has an informal tutorial of how to get started and run an Applescript with Capture One:


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

    tell application "Capture One 11" to tell current document to tell current collection
    repeat with thisVariantIndex from 1 to count of every variant
    set imagePathName to path of parent image of variant thisVariantIndex
    if length of imagePathName = 0 then
    log ("could not get path of Image " & (get name of variant thisVariantIndex))
    else
    set ImageFileName to last item of my splitStringToList(imagePathName, "/")
    tell variant thisVariantIndex to set status title to ImageFileName
    end if
    end repeat
    end tell

    on splitStringToList(theString, theDelim)
    set astid to AppleScript's text item delimiters
    try
    set AppleScript's text item delimiters to theDelim
    set theList to text items of theString
    on error
    set AppleScript's text item delimiters to astid
    end try
    set AppleScript's text item delimiters to astid
    return theList
    end splitStringToList
    1
  • NN635261809663419495UL
    Thanks Eric! I'll give this a try and see if I can get it to work.
    0
  • Rick Allen
    Variant Class contains name property so there is no need to parse the parent image path you can just call the property directly. This works for both CO10 and 11


    tell application "Capture One 10" to tell current document to tell current collection
    repeat with thisVariantIndex from 1 to count of every variant
    set TheName to name of parent image of variant thisVariantIndex
    tell variant thisVariantIndex to set status title to TheName

    end repeat
    end tell
    0
  • Eric Valk
    Good point, thanks Rick.
    0
  • Matthew Jensen1
    Hey Rick!

    Nice one. Is there a way for me to incorporate removing the trailing number counter i.e. -003 within this script?

    Cheers

    Matt
    0
  • Rick Allen
    Hey Jensen

    If its always the last 4 characters then below should work. If you need to remove anything after the dash then thats going to cost a beer 😂


    tell application "Capture One 10" to tell current document to tell current collection
    repeat with thisVariantIndex from 1 to count of every variant
    set TheName to name of parent image of variant thisVariantIndex
    tell app "finder" to set theNameS to text 1 thru -4 of TheName
    tell variant thisVariantIndex to set status title to theNameS

    end repeat
    end tell
    0
  • Matthew Jensen1
    Haha! You know it!

    6 Pack? I am doing everything I can to get this studio off LR. It is sucking my soul away.
    0
  • Rick Allen
    I'm sure there is a more elegant way but its been a big day on set.
    Beers in Bondi Matt next month...

    tell application "Capture One 10" to tell current document to tell current collection
    repeat with thisVariantIndex from 1 to count of every variant
    set TheName to name of parent image of variant thisVariantIndex
    set astid to AppleScript's text item delimiters
    set AppleScript's text item delimiters to "-"
    set theNameS to text 1 thru text item -2 of TheName
    set AppleScript's text item delimiters to astid
    tell variant thisVariantIndex to set status title to theNameS

    end repeat
    end tell
    0
  • Vaisakh

    Rick Allen I'm trying to achieve the same thing but on Capture One 2023. Do you think this script will work on it? :D

    0
  • Rick Allen

    Yeah not much has changed to the library nothing that would break this.

    0

Post is closed for comments.