Spotlight: How to update Finder/Spot Comments without Finder/Automator/GUI?

I am trying to find a way to update the Spotlight Comments field without using a GUI like Finder/Automator.
OS X provides good commandline tools for reading metadata.
% mdls myfile
would list:
kMDItemFinderComment = "This is David's file."
This is good for searching.
Now, I need to write/update the metadata instead of just reading it. E.g. I want something like
% mdupdate kMDItemFinderComment "This is Aber's file now."
I have searched through the documentation for Spotlight but all the examples given were on querying the file. There is no documentation for updating metadata programmatically.
Since OS X did not provide any command line tool to update metadata, is there some C/Carbon/Cocoa API I can call from a C program to do so? If yes, then I can write a command line C program to achieve what I need.
(or could someone point me to third party command line app to do likewise?)
Any help would be greatly appreciated.

Hi David,
I noticed the same thing/shortcoming a while ago. I think what you're after is an excellent comandline tool called 'xattr'. Have a look here, you can download the source or the binary from the links on that page.

Similar Messages

  • TS2734 Is it possible to find an IPAd without find my Iphone activated?

    Is it possible to find an IPAd without find my Iphone activated?

    One word.  NO
    Sorry.  If you have lost your iPad, immediately go to iTunes and change your Apple ID password.  Change your email passwords.  Change the passwords you use for any app tied to a credit card.

  • HT6154 Can someone please just help me figure out how to update this stupid phone without losing anything? I somehow have more than one Apple ID on this,but I just want my music and my pictures to stay and I'm terrified of losing these things.

    Can someone please just help me figure out how to update this stupid phone(iPhone 4)without losing anything? I somehow have more than one Apple ID on this,but I just want my music and my pictures to stay and I'm terrified of losing these things. I have a lot of music from old CDs on here,and for some reason I can't even transfer them manually onto my computer. I'm not tech savvy whatsoever. Someone please help,having my music is the the whole reason I still have this phone.

    First read about back http://support.apple.com/kb/ht1766
    Then  read on how to transfer photos to your computer http://support.apple.com/kb/ts3195
    Then
    UPDATING iOS
    Over the air updating of iOS needs iOS 5 or later so unless you have iOS 5 or later you will not see updating in setting
    The following link explains how to update http://support.apple.com/kb/HT4972
    This link explains how to update using wireless http://support.apple.com/kb/HT4623
    This explains how to transfer purchases to your computer http://support.apple.com/kb/ht1848

  • HT2534 How do update A free app without a credit card

    How do I update a free app without a credit card

    This user, mountaingoatgirl, explains how to get a None* option in your account details in the iTunes app on a Mac or PC. -
    https://discussions.apple.com/message/24907941
    *No bank card

  • How to update client profile manually (without APNs)

    Currently implementing an OS X Server with a specific goal of device management using the Profile Manager. I have a thorough understanding of APNs roll in this where communication is sent to APNs which then gives the client a notification to "check-in" with the server for updates. So the actual data exchange is only between the server and client. (Like the diagram below...)
    However, for security reasons I want to be able to accomplish Client-Server mdm checkin manually without APNs if I want to. In theory, this should be possible because the client obviously runs code to search for the server, communicate, and apply any changes to its configuration profile. Based on the OS X server documentation for this, it does this over SSL to the server for an mdm_checkin. The client also automatically checks the server on each startup, so restarting the machine does in-fact tell it to check the server and gets any profile changes that are holding as tasks. (Obviously, its not ideal to restart every time I want a change...)
    Again, for security and troubleshooting purposes, I want to avoid APNs and do this communication manually. I'd also like to avoid downloading from the myDevices portal, or transferring a profile to be double-clicked/opened, etc etc. However, for the life of me I can't find any other documentation or code that may direct me how to do this! It seems like there should be sometime to run or few terminal commands to accomplish this...
    Has anyone else attempted this or had success telling a client manually to talk to it's mdm server? (or even using mdmclient?)
    Thanks!

    Enrolling a device to an MDM e.g. Apple's Profile Manager does not require APNs, it merely requires 'installing' the enrolment profile and optionally a trust profile. However normally if you make a change to a profile this would be 'pushed' to client devices by sending an APN message to tell the client to 'phone home' to download the new profile.
    I install the trust and enrolment profiles during a DeployStudio imaging workflow and at the moment use APNs to send notification for updates, however for another different network I am looking at the following instead of APNs.
    The latest Munki software now supports installing Profiles directly, before it used to be necessary to wrap the profiles inside Apple installer packages.
    Note: Profiles can be distributed 'over the air' via APNs, hosted as files to b manually downloaded from a web server, or emailed to users/devices as a file attachment, and as mentioned above wrapped inside an Apple Installer package which would run a post-install script to install the profile.
    Therefore you could generate the updated profile and use Munki 2.2 to manage distributing and installing the updated versions. Of course an important limitation is that Munki is for Macs only and does not cover iOS devices. Munki does not use APNs. The Munki client needs to be able to talk to your Munki server which ideally should only be contactable on your LAN, a VPN connection would work.
    Note: It is probably not worth looking at Casper Suite even though it supports iOS as it uses APNs.

  • How to Update Android Enterprise APP without any prompt or click?

    Hi,
    I have an app running on Samsung Android Devices
    I have two version 103 and 110
    I can deploy and install  without any prompt or click version 103 by using Application policy. I just Selecten "required"
    Then I have to updta this app from 103 to 110.
    In able to do this, I change apk file in application policy.
    But, In afaria client, I see that version 110 is shown in update tab. And waiting for tap to update.
    I want to update automatically update 103 to 110.
    How?
    Maybe first of all I have to run Samsung configuration policy to uninstall 103 and then run application policy to install 110.
    But this is complicated.
    What I've done?
    I run Application policy to install 103.
    Then I change apk file 103 to 110 in application policy.
    Then create a session to send 110.apk file to device.
    Then run configuration polict to update from 103 to 110 from defined file location on devices. (storage/sdcard0/110.apk)
    I know it is more complicated.
    Is there any simple method?

    Hi Tevfik,
    Even i have the same problem and don't want to follow this complicated process.
    Did you latter find any easy way out, to update the enterprise app in the Samsung device without user intervention?
    Thank you
    Regards
    Sajan Mathew

  • How to find your ipod without find my iphone?

    my ipod got stolen, and i dont have Find My iPhone turned on, but obviously I need to find it. How do you do it????

    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    - You can also wipe/erase the iPod and have the iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it.
    - Apple will do nothing without a court order                         
    Reporting a lost or stolen Apple product                              
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • How can i track my ipod without find my iphone app

    either i lost my ipod or it has been stolen an i never put the "track my ipod" app on my ipod please help

    No app is required.                                               
    - If you previously turned on FIndMyiPod on the iPod in Settings>iCloud and wifi is on and connected go to iCloud: Find My iPhone, sign in and go to FIndMyiPhone. If the iPod has been restored it will never show up.
    - You can also wipe/erase the iPod and have to iPod play a sound via iCloud.
    - If not shown, then you will have to use the old fashioned way, like if you lost a wallet or purse.
    - Change the passwords for all accounts used on the iPod and report to police
    - There is no way to prevent someone from restoring the iPod (it erases it) using it.
    - Apple will do nothing without a court order                         
    Reporting a lost or stolen Apple product                              
    - iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number

  • How to update the VBFA table without entries in VBRK and VBRP tables

    Hello,
    I have a requirement , where the sales order , delivery happens in one SAP system say X system and billing document wil happens in other sap system say Y.
    Now in this particular case , if the user want to know the billing document number in X system. what would be the solution.
    Is there any possibility to update the VBFA table with invoice number of Y system (without updating the VBRK and VBRP tables).
    User want to see the billing doc number from sales order in the form of document flow in X system
    Thanks in advance
    Pradeep

    Hii
    Without updating VBRK/VBRP table and updating VBFA is not possible, So you have to play with work arround to create one Z TABLE, so whenever system Y will create billing document with the reference of System X data you have to update Ztable with Invoice number created in System Y, The primary key will be in Z TABLE is Delivery document number to track one to one with billing doc.
    Thanks and Regards
    Shambhu Sarkar

  • HT1222 how i update my ipad 2 without using i tunes anyone help????

    currently i am on 4.3.1 .i want to update my ipad 2 on 5.0.1 without using i tunes can anyone help from where i can download ios5.0.1 firmware..thx

    Have you tried syncing once and then try transferring purchase again? Syncing should trnafer them during the sync process.
    Also make sure that you don't have content that you bought with another Apple ID that needs to be transfered as well.

  • How to update delivery note comment while creating return order

    Hi all.
      I need to update the delivery note comment in return sales order.Could you pls let me know is there any FM to achieve this pls?
    Thanks in advance.
    Thanks & Regards,
    sami.

    Hi,
    Try using SD_SALESDOCUMENT_CHANGE function module. Give the text in SALES_TEXT parameter.
    KR Jaideep,

  • How to update a provisioned Apps without store access ?

    Hello All,
    Some explications of my issues :
    Windows 8 Enteprise will be the next OS used in my firm.
    Top management has decided to close the access to the microsoft Store - but want to have the weather, maps, music and video on the modern start menu.
    My question is :
    Is it possible to keep up to dat provisioned apps ( as Weather Bing) using SCCM 2012 or something else - without Store which is blocked by GPO ?
    More information :
    Client joined to the domain / DNS, AD, SCCM, MDT, etc... still is use.
    I'm totally not a developper :(
    Thanks in advance for your help

    In Windows 8 you have to update Apps from Store manually and if you disable Store, you won't get those updates. Once way to resolve this issue is instead of blocking Store, use Applocker and create a policy to block all Apps except the one that are using.
    In Windows 8.1 Apps will updates automatically and I suggest use a testing PC and install Windows 8.1 Preview and try out your scenario with it and see if it works.

  • How to update an win8 app without uninstall it?

    Hello everybody!
    I need to deploy an update of an app in my company using the sideloading mechanism and sccm 2012.
    If I choose Supersedance, select the installed app version and check the uninstall option, the app is installed, but unfortunately all permissions need to be re-authorized by the user.
    If I don't select the uninstall option, the deployment fails saying package with same identity is already installed..
    How can I update my enterprise app, keeping the registered permissions by using sccm?
    thanks in advance!
    Florian

    Hi,
    This might be a CA problem. Please check your certificate. The following article might be helpful.
    http://blogs.msdn.com/b/windowsstore/archive/2012/04/25/deploying-metro-style-apps-to-businesses.aspx
    Best Regards,
    Joyce Li
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to update to Mountain lion without credit card

    Hello,
    I use Aperture on a Snow Leoard iMac. To update Aperture, I need Mountain Lion, available only via Apple Store.
    On Apple Store, they accept wired transfert, but for a Apple ID, you need an American bank card. (European Bank Card like Mister Cash, Bancontact... aren't authorised).
    So, how can I do ?
    Thanks
    Et Photo-Web

    If you can't supply a credit card of the type required, the only other option is to get a prepaid iTunes card or get someone to give you a gift certificate of sufficent value to cover the cost of the purchase, if either is available in your country.
    Regards.

  • I want to remove buttons in favour of a Windows menu equivalent, how do I control the software without cluttering the GUI?

    My Graphical User Interface is fairly full of controls & buttons, removing the buttons should simplify and improve the appearance of the GUI. I would like to capture all of the menu selections and drive the software without relying on offscreen buttons etc. Is there a standard technique? I have started to look at queue, notifiers, occurences etc but I havent seen anything yet that looks obvious for the application.
    Help appreciated.

    You want to replace front panel controls with a custom menu? If that's true, then the code to do that is similar to the best way to handle the original controls. The event structure has both menu selection (User) and Menu Selection (App). As the shipping example Menu Selection with Events shows, you get the ItemTag and MenuRef from which you get the menu's item name which can be connected to a case structure. Since the menu name is a string, it also works well in a queue based state machine.

Maybe you are looking for