Automator for Exporting Spotlight Comments?

Hello,
I have around 700 historic photos that have been digitized. All the photo details (dates, etc.) were entered into the Spotlight Comments field under Get Info. Unfortunately, none of the comments appear when I open the photos in Adobe Bridge CS4. Is there an easy solution (perhaps an Automator script) to export the Spotlight Comments and use them elsewhere?
Thank you,
Brian

Brian
If I read you right, what you are trying to do is grab Finder metadata and convert it to photo metadata. Specifically, convert spotlight comments to Exif and IPTC - which is what a Photo app will need.
You can't do this with Automator. The Automator dictionary has ways to set Spotlight Comments but I can see no way to get them. Further the dictionary has the ability to write to the IPTC data only of images in Aperture, not in the Finder or iPhoto.
You might do better with that question on the Automator forum here:
http://discussions.apple.com/forum.jspa?forumID=1261
Have you tried the Applescript that was suggested when you posted the query last?
As your target are file managed by Bridge, give the Adobe forums a go too.
However, you may run into another issue here and that is that most scanners (as I presume this is how the photos were digitised) do not create Exif and IPTC data for scanned images. It may not be possible to do what you want to do.
Regards
TD

Similar Messages

  • Is it possible to export Spotlight Comments?  Please help.

    Hello,
    I have around 700 historic photos that have been digitized. All the photo details (dates, etc.) were entered into the Spotlight Comments field under Get Info. Unfortunately, none of the comments appear when I open the photos in Adobe Bridge CS4. Is there an easy solution to export the Spotlight Comments and use them elsewhere?
    Thank you,
    Brian

    I found this AppleScript on Google. I cannot vouch for it: I have never tried it and it is several years old. It appears to use GraphicConverter. But you can experiment with it, and see if it works for you.
    [http://forums.macosxhints.com/archive/index.php/t-76368.html]

  • Automator doubling my Spotlight comment text

    I made a simple workflow to add text to the Spotlight comments field using "Get Selected Finder Items" and "Set Spotlight Comments for Finder Items" but when I use it, the text I enter is entered twice in the Spotlight field. What am I doing wrong here or is this a bug?
    Thanks,
    Edward

    Are those the only actions in the workflow? If you are doing something like using this as a Service, the workflow is automatically passed the selected items, so adding another action to get the selection will double up the items.
    Also note that this is the Tiger Automator forum - Automator in *Snow Leopard* is quite a bit different, so future questions should be posted in the Snow Leopard forum.

  • Ask for Text for Set Spotlight Comments for Finder Items

    I want the text from the "Ask for Text" to go in to the "Set Spotlight Comments for Finder Items" action, but they don't seem to interact.
    Any ideas?

    first you make a new variable using variables tab. then you add the action "set value of variable" right after the action ask for text. drag the variable you made to the variable field of that action. this will set the value of that variable to the output of the previous action.

  • Automator 2-Add Spotlight Comments still dead?

    After the latest update, I was hoping that this Action would have been fixed. When creating a Workflow, adding Spotlight Comments works fine. However, save as a plugin or application and its dead.
    Is it me, or is this still a bug after the latest update?

    I use this more than any other Action because my entire Archive is rooted in the Spotlight reference process.
    I was given a possibility in another post to not use "Get Selected Finder Items" and then it would work. Which, to me, is counter to proper usage, especially in regard to how it worked in Automator 1. So I am considering this a "bug" in Automator until they fix it.

  • Need help for automated import/export of comments in XFDF

    Hi !
    I created 2 Buttons on my toolbar. One for send comments and one for receive comments! If I click the send button, a window opens and ask for the directory where I want to save the xfdf file.
    How can i realize, that I can save the xfdf-file automatic in a folder, which is specified in the javascript file? The same for import!
    In web I found:
    cExec: "this.importAnXFDF({bAnnotations: true, cPath: /c/PDFTest/Demo.xfdf});",     and
    cExec: "this.exportAsXFDF({bAnnotations: true, cPath: /c/PDFTest/Demo.xfdf});",
    but if click the button...nothing happens. How can I implement this??
    This is the sourcecode of the created config.js file
    var strtest= "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + // 0
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + // 1
    "FFE4DBD4FF8F9CC8FFD2D3E0FFDBDCD9FFC7E8F9FFC7E8F9FF999FC6FFEEEDEDFFFEFFFFFFB6C8E 7FFB2D0E3FFF8F8F8FFFFFFFFFFC2A47BFFD2BC9EFFD0B898FFEEEDED" + // 2
    "FFB0AFCDFFE7F2FBFFD1D1D0FFE4E4E4FFC3DAE7FFC7E8F9FF7674A5FFB3C9DCFFAAC4E8FF5D8FC 8FFB9D5E6FFD3C9D8FFFEFEFEFFC6AA84FFECE6DFFFFEFDFAFFD2C9C8" + // 3
    "FFC3DAE7FFB2BFCBFFA4B3C9FF9CB8D9FF7199B3FFA4B3C9FF8A8BBBFF9993A9FFAC9DA7FFA5989 2FF769BC4FFC6C2B8FFEEEEEFFFC2A47BFFF5F1ECFFAA8657FFD8D6D6" + // 4
    "FFDAD6E1FFDAD6E1FFCACFD3FF88899AFFB6AAB3FFD8D8D8FFE1E1E1FFE9E9E9FFEEEEEFFFE7E4E 5FF31312DFFDCDCDDFFFCFCFCFFF3F3F3FFCDBCA7FFC6C2B8FFE9E9E9" + // 5
    "FFEEE9E4FFE4E3EBFFE9E9E9FFE1E1E1FF9C966AFFDFDFDFFFD8D6D6FF8E3F43FF99987CFFCFBD6 FFFB7A289FFE9E9E9FFFFFFFFFFFFFFFFFFF8F8F8FFC6C2B8FFE6E6E6" + // 6
    "FFF9F9F9FFFDFDFDFFFEFEFEFFFFFFFFFFF9F9F9FFB0B0A5FFC5AE62FFE8D98FFF512C25FF845A4 3FFD2CC9FFFF3EAB8FFA79D79FF8C8674FFEBE5B6FFD6D7D7FFFBFBFB" + // 7
    "FFFBFBFBFFFEFEFEFFFFFFFFFFFFFFFFFFFDFDFDFFE4E4E4FF9F8940FFBDB689FFCFBD6FFFFBE89 1FFFDF4C0FFCFC384FFF3EAB8FFEBE5B6FFEDD26EFFDDDDDDFFFEFEFE" + // 8
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC0C1C3FF616D6BFF6E7B79FF5D676 8FF616665FFDADBDBFFD8D6D6FFD9D9D9FFE6E6E6FFFBFBFBFFFFFFFF" + // 9
    "FFFDFDFDFFF8F8F8FFFFFFFFFFFFFFFFFFFFFFFFFFF6F6F6FF616D6BFF6E7B79FF5B6562FF525A5 8FF616D6BFF6B7574FFFBFBFBFFFDFDFDFFFFFFFFFFFFFFFFFFFFFFFF" + // 10
    "FFF5F5F5FF686C6CFF6E7B79FF6D7877FF6E7B79FF646F6EFF616D6BFF464B47FF969999FF383E3 CFF616D6BFF6B7574FF48504DFFFAFAFAFFFFFFFFFFFFFFFFFFFFFFFF" + // 11
    "FFFFFFFFFFFCFCFCFFECECECFFD5D6D6FFBABCBEFFC0C1C3FFDCDCDDFFEEEEEFFFFAFAFAFFF8F8F 8FFE9E9E9FF4D5653FF646F6EFF464B47FFF9F9F9FFFFFFFFFFFFFFFF" + // 12
    "FFFFFFFFFFFFFFFFFFF8F8F8FFE6E6E6FFDFDFDFFFDDDDDDFFE9E9E9FFF8F8F8FFFFFFFFFFFDFDF DFFF5F5F5FFB0B4B7FF5B6562FF565F5CFFF3F3F3FFFFFFFFFFFFFFFF" + // 13
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFEFEFEFFECECECFF525A58FFC0C1C3FFFEFEFEFFFFFFFF" + // 14
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFEFEFEFFF3F3F3FF868A8CFFFDFDFDFFFFFFFF" + // 15
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFEFEFEFFE9E9E9FFF8F8F8FFFFFFFF" + // 16
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + // 17
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" + // 18
    "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"; // 19
    var pos = 0;
    var iconStreamObj = {
        read: function readMyIcon(nBytes){
            var t = "";
            console.println("request for " +nBytes);
            while (pos < nBytes){
                t = t+strtest;
                pos += strtest.length;
            return t;
        width:17,
        height:20
    // Create a toolbutton using the icon I loaded above
    app.addToolButton
        cName: "receive comments",
        oIcon: iconStreamObj,
        cExec: "this.importAnXFDF({bAnnotations: true });",
        cTooltext: "Press button for receiving comments!",
        nPos: 0
    var pos = 0;
    var iconStreamObj = {
        read: function readMyIcon(nBytes){
            var t = "";
            console.println("request for " +nBytes);
            while (pos < nBytes){
                t = t+strtest;
                pos += strtest.length;
            return t;
        width:17,
        height:20
    // Create a toolbutton using the icon I loaded above
    app.addToolButton
        cName: "send comments",
        oIcon: iconStreamObj,
        cExec: "this.exportAsXFDF({bAnnotations: true });",
        cTooltext: "Press button for sending comments!",
        nPos: 0
    Please help!!  Thanks

    Doc is the type of object, so you would not use Doc.exportAsXFDF.
    In most cases you can use "this", but be careful as "this" will not always refer to the current document, it will refer to whatever object you are currently working within the parameters of.
    The security restrictions are quite clear, but I will sum up just to be sure.  You CAN specify the cPath parameter in the following conditions:
    Batch Process
    Running the code manually from the console
    Executing exportAsXFDF through an OLE call via the JSObject from an external application written in C/C++/C#/VB.NET/etc.
    Those are the ONLY times that you can specify the cPath parameter in the exportAsXFDF call.  If you try to specify it in any other instance, the call will fail and nothing will be exported.  This means that you CAN NOT specify the cPath parameter from a document-level script, folder-level script, menu item call, etc.

  • Automator for exporting

    I don't get it -- I've watched lots of tutorials that show me how to rename my photos, but how do I use automator to render a portion of a timeline into a 'iPod video and iPhone 640x480.m4v' file?
    Instead of choosing file>export using compressor and then selecting apple devices then the iPod video and iPhone 640x480 option - select, select, can't automator make that happen for me?
    J Jordan
    www.kitesites.com

    sure it can ... just do it once whilst recording your actions with the "watch me do" facility
    http://library.creativecow.net/tutorials/applefinalcutpro#cowdog
    or rather than doing all that select select business why not just save the presets in compressor droplets

  • Problem with add Spotlight Comments script.

    Hello,
    I am trying to add Spotlight Comments to some files using Automator. I have made an very simple script in Automator that add Spotlight Comments to the files that I have selected in Finder. I save this script as an app and it work great. I also save the same script but not as an app but as a service. The problem here is that when I run the service it add the same Spotlight Comment two times. For example, if I add "@Webshots" with the app the Spotlight Comments of the files is "@Webshots" but when I do it with the service the Spotlight Comments of the files is "@Webshots" "@Webshots". Can anybody help me with this? I will appreciate it a lot any help that you could give me. Thanks

    I suspect your workflow includes 'get select finder items' as the first action. get rid of it. it's redundant in a service that accepts files and folder in finder. that's why everything happens twice.

  • Spotlight comments search

    I have a customer that upgraded to 10.5 server for the spotlight comments searching on share points. They can search everything else but the comments. We have tried setting up a group with all the users having full read/write permissions. I have reindexed the share points. I can search the comments from the xserve that the raid is attached to. Just not on any of the networked computers. The networked computers are all PowerMac G5s running Tiger. I have heard that having a space in the share point can cause problems and some of the share points have space but not all and they can't search the comments on any of the share points. We have tried searching files on the root directory as well as in folders on the share points. Has anyone else had this problem or have a suggestion?
    Thanks

    Hi TD
    Yes and no.
    Yes it worked the way you mentioned but if I change the Spotlight Comment: on the same file to something else I can still find it via 'Fruit'. I much prefer command-space bar to call Spotlight.
    How long does it take a change to a Spotlight Comment: to filter into Spotlight?
    Its not the end of the world its just I was finding Spotlight really useful until I came up against this.

  • How to copy a files spotlight comments for an entire folder and place them in a different file with that same name

    I have the same question in a different discussion but I already marked it as solved because one of the questions was answered. Here's the linke to the other discussion if your interested https://discussions.apple.com/thread/5970421 
    I have movie covers saved as a jpeg for every movie my family and I own. There is about 700 and they each have a comment of the main actors, release dates, and descriptions. This makes it easy to find what to watch.Is there an applescript, automator, program I can download,  or program code supported in xcode that will do the following set of inscructions?
    Take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments to a file with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste
    and do this for all 700 files

    Clendenen02 wrote:
    where should I run the code? in the terminal, or an applescript, or should put it in xcode and run it from there or the terminal.
    What MrHoffman said.
    But if it's easier, you can wrap it in Automator and have Automator ask for the Folders: (Test on a sample of your files before running on all 700 files)
    (do you really own 700 movies??)
    The Workflow is:
    Put this in the Run Shell Script Action (and pass input as arguments":
    PicDir=$1
    MovDir=$2
    for f in $PicDir/*
    do
         if [ ! -d "$f" -a "${f##*.}" = "jpeg" ]; then
              comment=$(mdls -raw -name kMDItemFinderComment "$f")
              if [[ $comment != "(null)" ]]; then
                   picname=${f##*/}
                   movname=${picname%.*}.m4v
                   if [[ -e "$MovDir"/$movname ]]; then
    osascript <<-EOF
    tell application "Finder"
    set comment of file (POSIX file "$MovDir/$movname") to  "$comment"
    end tell
    EOF
                   fi
              fi
         fi
    done
    (BTW, I know that this is a bit of sloppy scripting (wraping an osascript in a Bash Script wrapped in Automator, but it does what you need)

  • How to copy a files name and spotlight comments to a text file for an entire folder

    I have movie covers saved as a jpeg for every movie my family and I own. There is about 700 and they each have a comment of the main actors, release dates, and descriptions. This makes it easy to find what to watch. I want my parents to have all of this info but they have a windows laptop so the comments don't transfer with the file and can't be searched like you can on a mac. Is there an applescript, automator, program I can download,  or program code supported in xcode that will do at least one of the following things?
    1)Take the name of the picture file and spotlight comment, copy and paste it into a text document like word that looks like this...
    File Name1- Spotlight Comment for file 1
    File Name 2- Spotlight Comment for file 2
    . for all 700 files in a folder
    2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste 
    and do this for all 700 files
    3) Is there a free photo program that works on mac and windows that I can put all my movie pictures in and have a description like I did with the comments? It would also need a place that to search the description for keywords. So Basically an itunes for pictures that works on both mac and windows. If so I still need a way to get the spotlight comments to the description.
    4) I feel like this would make things more difficult, but if not I can put all of the .m4v files in itunes so instead of pasting all the comments back into a file in finder paste them in a description in itunes
    5) At the very least a code that I can run one by one for every file that will paste the comments into the same document
    Note: When I say spotlight comments I mean the comment box that is available when you click on get info of a file. The pictures are in the pictures section of finder in a folder called Movie Pictures. The movie files are on an external hard-drive in a file called Movies. Also I am slightly familiar with applescript and automater in that I have used both to create keyboard shortcuts and simple voice commands. I have programmed in c++ and C too. So If you give me a code for applescript I do know what to do with it.
    Thanks to anyone who takes the time to read all of this and extra thanks to anyone who tries to help.

    Clendenen02 wrote:
    2) It would be equally helpful if there was something that would take the name of the picture file and spotlight comment, copy and paste it to a movie file's comments with the same name but obviously has different extention. For an example
    In a Pictures folder
    Name: Dark Knight, The.jpeg       Comment: (2008) Genre: Action...             <- copy comment
    In a Movie Folder
    Name: Dark Knight, The.m4v       Comment:                                               <- paste 
    and do this for all 700 files
    This Bash script will do it.
    Edit "PicDir" and "MovDir" to the location of your Folders
    (Note: The comment is written to the m4v file using xattr, so the Spotlight comment field appears blank in Finder, but the comment metadata is still indexed by Spotlight (If you add a Spotlight comment from Finder, it is stored both as an extended attribute and in a .DS_Store file)
    #!/bin/bash
    PicDir=$HOME/Desktop/Pictures
    MovDir=$HOME/Desktop/Movies
    for f in $PicDir/*
    do
         if [ ! -d "$f" -a "${f##*.}" == "jpeg" ]; then
              comment=$(mdls -raw -name kMDItemFinderComment "$f")
              if [[ $comment != "(null)" ]]; then
                   picname=${f##*/}
                   movname=${picname%.*}.m4v
                   if [ -e "$MovDir"/$movname ]; then
                         xattr -w com.apple.metadata:kMDItemFinderComment "\"$comment\"" "$MovDir"/$movname
                   fi
              fi
         fi
    done

  • GET spotlight comments automator?

    I have written an automator, based on a suggestion found at this site, that appends comments to the spotlight comments. I can even delete existing comments. But, what I don't seem to be able to do is to GET EXISTING comments and make a change to these existing comments - add additional comments, if necessary - and enter then new comments back into spotlight comments.
    Does anyone have any ideas?
    Thanks.
    Matt

    Save the code presented below as an application.
    Launch (run) the application to select a file for 'comment' processing; or, drag items onto the applet for each items' 'comment' field to be processed.
    --- Code starts here ---
    on open (ditems)
    repeat with i in ditems -- Cycle through list of dragged items.
    my handle_Item(i) -- Process each item.
    end repeat
    end open
    on run
    my handle_Item(choose file without invisibles) -- Select file to process.
    end run
    on handle_Item(tItem)
    tell application "Finder" to set (comment of tItem) to (text returned) of (display dialog (tItem as string) with title "Spotlight Comment: " default answer (comment of tItem) as string) -- Display and accept modification of 'comment' field contents.
    end handle_Item
    --- Code ends here ---
    To process a file or folder via launching the applet ...
    --- Code starts here ---
    on open (ditems)
    repeat with i in ditems -- Cycle through list of dragged items.
    my handle_Item(i) -- Process each item.
    end repeat
    end open
    on run
    if (((button returned) of (display dialog "Make a selection:" buttons {"Cancel", "File", "Folder"} default button 2)) is "File") then
    my handle_Item(choose file without invisibles) -- Select file to process.
    else
    my handle_Item(choose folder) -- Select folder to process.
    end if
    end run
    on handle_Item(tItem)
    tell application "Finder" to set (comment of tItem) to (text returned) of (display dialog (tItem as string) with title "Spotlight Comment: " default answer (comment of tItem) as string) -- Display and accept modification of 'comment' field contents.
    end handle_Item
    --- Code ends here ---

  • Automator - get or display Spotlight Comments?

    I have a workflow to set [or append to] Spotlight Comments, but it would help to show the existing comments first.  How can I get an Automator workflow or application to display the Get Info windows for selected file[s]?  [Or get the comments and put into a variable.]    -Peter
    [Using Lion on a MacBook Air]

    You can use a Run AppleScript action to get the comment of an input item (e.g. from a selection or choose dialog), which can then be passed to a Set Value of Variable action (the Set Spotlight Comments for Finder Items action will accept a variable in its text field), for example:
    on run {input, parameters}
         tell application "Finder" to return comment of first item of input
    end run

  • Automator Folder Action: File Name = Spotlight Comment?

    Hey guys,
    I'm trying to have automator add the original filename of a file as spotlight comment when it is added to a certain folder. I can only use the "Set Spotlight Comments for Finder Items" in folder actions to add a specified comment, but nothing else. Is it possible to grab the file name via applescript?
    The idea behind this is to preserve the original file names of all downloaded files before they get renamed.
    Thanks,
    V

    Thanks for your reply, I now have your action installed and it does get the filenames, but I still can't add them to the spotlight comment text box. Looks like I didn't think this through properly.

  • Raw Search Terms for "Spotlight Comment" and "Locked" Status

    Is it possible to do a raw search for a specific Spotlight Comment. I know the option exists in the Other… dialog box, but I need to find files that do not contain comments which is not choice.
    Also, is there any way to find only files that are unlocked?

    If you go to Others and select Raw Query you can use it find items with a specific comment, and items without any comment. For example, if you have the comment "testme" in the Spotlight field you would paste this into the Raw Query field:
    kMDItemFinderComment == "testme"
    and all files with that comment would be found. To find files in a folder that contain NO comment at all, you would use this:
    kMDItemFinderComment != "*"
    Be warned though: when I tried this on a folder with only 5 items in it, 4 with comments and one without. it worked, returning the lone uncommented file, but it took an amazingly long time to do so (perhaps a minute, while the search for "testme" was instantaneous).
    The "File readable" and "File writeable" functions shown in Others, which presumably are what one would use to find locked files, simply do not work. This is not surprising since the information about whether a file is locked or not does not in fact appear in a file's metadata. I guess that will be a future addition. You can use find in Terminal to search for files that are locked/unlocked. Let me know if you really want to do this.
    Francine
    Francine
    Schwieder

Maybe you are looking for