Paste clipboard's contents to selected file's Get Info (Spotlight) comments

Hi,
Could someone please help me in building an AppleScript that would paste the clipboard's current contents to the currently selected (in the Finder) file's Get Info (Spotlight) comments?
I know this can be done with an Automator workflow or Folder Action, but prefer an AppleScript.
Many thanks!

The following script will add (a space and then the clipboard) to the comments of the currently selected file. In case there are several items selected it only deals with the first one, and there is also a dialog to edit the final content:
<pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">set TheClipboard to (get the clipboard)
tell application "Finder" to try
set TheFIle to the first item of (get the selection)
set TheComment to the comment of TheFIle
set TheName to text ((length of (path to home folder as text)) + 1) thru -1 of (TheFIle as text)
if TheName ends with ":" then
set TheType to " folder "
else
set TheType to " file "
end if
display dialog ("Change the comment for the" & TheType & return & quoted form of TheName & "?") with title "Edit Spotlight Comment" default answer (TheComment & space & TheClipboard)
set comment of TheFIle to text returned of the result
end try
</pre>

Similar Messages

  • Put URL of downloaded files in Get Info's Comments field?

    I'm using Safari Version 3.0.4 (build 5523.10.6).
    I know it is possible to have the url of where a file was originally downloaded to appear in the Get Info’s comments field automaticly.
    I know this because it used to do this sometime ago, I remember. Is there a way to get this feature back or are there programs or plug-ins that do this (maybe for Safari)?

    DownloadComment is probably what you are looking for:
    http://www.macupdate.com/info.php/id/15833

  • I can't seem to open (view) my photos.  I get an error message that says "the file couldn't be opened because you don't have permission to view it. To view or change permission, select the item in the finder and choose File. Get info."

    I can't seem to open (view) my photos.  I get an error message that says "the file couldn't be opened because you don't have permission to view it. To view or change permission, select the item in the finder and choose File. Get info."  I have never had this happen before?  Thanks!

    Try the following:
    1 - launch iPhoto with the Command+Option keys held down and rebuild the library.
    2 - Run Option #1, Repair Permissions.
    OT

  • The control click and external mouse right click no longer works when copying and pasting album art within itunes. Ex. Hit get info for one song to paste to the rest, copying the artwork wont work when it used to.

    The control click and external mouse right click no longer works when copying and pasting album art within itunes. Ex. Hit get info for one song to paste to the rest, copying the artwork wont work when it used to.

    Hello there, Teworsham90.
    The following Knowledge Base article reviews the process of adding artwork to content in your iTunes Library:
    iTunes: How to add artwork to songs and videos in your library
    http://support.apple.com/kb/HT1409
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro D.

  • I can no longer edit information for streaming files in Get Info.

    I can no longer edit information for streaming files in Get Info.

    Similar problem here. My Ical refuses to edit or delete events. Viewing is possible, though sometimes the whole screen turns grey. Adding new events from mail is still possible. The task-pane completely disappeared. My local apple technic-centre messed about with disk utility for a bit and than told me to reinstall leopard. I could of course do that, but it seems to me that reinstalling Leopard just to fix iCal events is a bit invasive.
    I tried also tried removing everything, installing a new copy of iCal from the leopard-cd, software updates, all to no avail.
    At the moment I'm open to all suggestions that do not include a complete leopard reinstall.

  • Find files that has no Spotlight Comments!

    Hi,
    Is there a way to create a Smart Folder to collect all the files that have no Spotlight Comments attached to them?
    Do Comments get copied when backing up to an external device? If not, is there a best practice?
    Regards,
    Nawaf
    MacBook 13" 2Ghz 2GB   Mac OS X (10.4.9)  

    Thanks Steve
    This is the disadvantage of storing your files as referenced. Importing all referenced files is not the best solution for me, since I have a lot (100.000+) files.
    However, I just realized that you have to open all stacks in order to have Aperture show the right number of photos in the database. I found that I only missed 3 files and I did find them.
    Problem solved. Advise to others: be very structured when you store your files as referenced files.
    In future releases of Aperture there could be a function that would allow you to import files from folders that are not already inported.
    Aperture rocks.... sorting and filtering is great. Metadata management is sweet and makes things so much more easy.
    Karsten

  • Merge content from a file that gets updated separately?

    Is there a simple way in RoboHelp to have a placeholder in a topic where content from a separate source file (e.g. HTML or Word) gets displayed such that if the source file changes, the content inserted in the topic gets updated when the project is regenerated?
    In other words, I have an HTML page in my project with some text and then a reference of some sort that grabs the contents of another file and pulls that in without a manual import?

    Yes, I'm using RoboHelp 8 and the explanation on your site did what I needed. Can the frame size (in red below) be dynamic to fit the content?
    <iframe src="save.htm"  
    frameborder=0
    style="width: 80%; height: 100px;"  
    scrolling="no">
    </iframe>

  • I a owner and administrator. I can't change any file permissions. Help tells me to 'get info' on a file, them click on the lock icon to enter password. The lock icon is not present on any files I 'get info' on. How can I change permissions

    I attached an external drive to my macbook pro for backup purposes. I found that the device is 'read only' for me. I read that I could change permissions by selecting 'get info' for a item and clicking the lock icon to submit my password. The lock icon is not displayed on any 'info' window for any file on my macbook, much less the attached drive. I am the only user and administrator as far as I know. What steps can I take to change permissions? Thanks. My 1st post.

    How can I tell? The 'get info' window has no lock and under sharing and permissions, on says 'you can only read'. I did a get info on the Macintosh HD and it had a lock on it but said I could only read, for what that it worth.

  • Unlockable file and 'Get Info' doesn't work

    Hello
    I have a file from an existing external hard drive that I brought over to my new Mac Mini. I can not delete or unlock this file. When I do a Command I (get info) the finder/desktop just flashes and no menu comes up. Therefore I can't uncheck the 'locked' box. I can't move it to the trash either.
    The file is a Shockwave Plugin from OS 9 (ShockwavePlugin.class). I'm on a Mac Mini core duo, running 10.4.7
    I've searched everywhere on here and can't seem to find a solution. I even tried using TextEdit and saving a new file with the same name as the locked file (to replace it) and TextEdit won't allow me as it says the file needs to end in ".rtf"
    Stephan

    Hi Niel
    First off, thank you for such a quick reply.
    I just tried doing what you suggested, hit run, and then in the bottom of the menue (below in the window where I pasted what you said to run) it says 'false'
    I then tried to move the file to the trash and it won;t allow me. The eror message I get says "the operation cannot be completed because the item "ShockwavePlugin.class" is locked.
    Does this tell you anything more?
    Stephan

  • Multiple files on "get info"

    When I want to get a size evaluation on multiple files and I press "get info" many windows pop up, one for each file I marked.
    How do I make "get info" show information for multiple files on one window?

    Select the files then press
    Command + Option + I

  • SWF-file not getting info from UI

    Hi All,
    I have a dialog that loads a flash-file. This swf-file gets info from my dialog and puts it in a datagrid.
    It works well, untill i try it the script on an other computer. The swf-file loads but is not receiving any information given through the UI.
    Is it a matter of installing extra options/software on the other pc?
    My computer (the script works) is a Windows XP with Adobe Design Premium.
    The other computer is also a Windows XP with indesign and flash player installed.
    Is there anyone who has an idea?
    THANKS
    Greetz,
    Glen

    Ok, i have the answer to my own question.
    I forgot that i had to change the settings in the settings manager of the flash player.

  • Can't Change File In Get Info

    I'm trying to open my OS9 files with Adobe Illustrator. They open with TextEdit now. When I change it to "Open with Adobe Illustrator" in the Get Info window, it stays in TextEdit. What's going on? It use to work.

    Never mind. I got it. I went to File and clicked Open With and clicked on AI. But I want to open all my files automatically with AI. And when I try to do that with the Get Info window, it doesn't work anymore.

  • HT204382 Help!  I just followed all instructions . . . downloaded DivX on my MacBook Pro so that I can view all of the avi movies but it still won't let me see them.  When I bring down the file and get info I can view it in the little box that only that.

    Okay so . . . just bought a new Mac OS X because my last MacBook Pro burned up.  I was luckily able to put everything on an external hard drive.  But when I try to play my movies from the hard drive or any other DVD that were downloads that are AVI  it says "QuickTime Player can't open "Genetic Roulette_(360p).avi" because a required codec isn't available."  So I went ahead and followed the instructions and download the DivX but it still will not play.  Can anyone out there help me?

    Download and install VLC. http://www.videolan.org/vlc/index.html and get rid of DivX.

  • I can not download my own artwork, I right click on a song go to info and no artwork tab pops up. i have followed the instructions on going to file then get info but nothing pops up for artwork to be added, i have windows 8 and running the 11.1

    artwork

    Leliforever, cheek you list of installed add-ons, the Ask toolbar can be installed without the users knowledge.
    For checking other extensions that may cause this, follow the procedure in this link - https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • Osx lion get info reporting incorrect file size

    Hi all,
    I am trying to troubleshoot a strange problem I am having with Adobe Revel. Adobe have been helping me to resolve it but my mac is displaying some odd behaviour which I need to explain and which may be affecting the adobe app.
    The adobe app creates a library file of pictures and the file should be growing as I download more pictures. If I right click on the folder and "Get info" the folder size shown is smaller than I would expect at 25MB given that it should contain a good number of Jpeg files.
    I have downloaded an app called "Grand Perspective" to help me manage disk space and for this particular file it reports a completely different (much Larger) file size than "Get Info" did (155 MB) which is much closer to what I would expect to find and it is growing as more pictures are downloaded.
    Any idea what could cause "Get Info" to report the wrong file size.
    I have another osx Lion mac with the same software loaded and although a completely different machine, it reports the same file size for this library folder as grand perspective does.
    Any help gratefully accepted.
    Slarti

    I'm finding the same behaviour running Lion 10.7.2 and the file with the exact same problem as yours is a Sente (bibliography software) library containing references and pdfs.  'Get Info' reports it as 130KB but I know the file is much much larger than that! Even the Size reported on Get Info shows 874.4MB which is still too small.  If I 'Show Package Contents' on the file and 'Get Info' on the 'Contents' folder which it then shows, I get the correct size of 1.14GB
    Apple Tech Support over the phone wasn't able to explain this behaviour.

Maybe you are looking for