Spotlight comments embedded in the file? - ehMac.ca
Facebook
Twitter
YouTube
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read Advertise


Reply
 
LinkBack Thread Tools Display Modes
Old Mar 30th, 2006, 10:15 AM   #1
 
Join Date: Jun 2005
Posts: 1,270
Question Spotlight comments embedded in the file?

I have a question about spotlight commenting. When you add comments to a file (or multiple files) do the comments get written directly to the file(s) or does it get written to a database that indexs the comments to the file(s)?

I ask because I have a huge image libary for work to which I've been adding comments to aid in searchs.

In the future I may have to move this library to a dedicated server so that many users over our provinicial network could access images. Most items are placed in a logically named folder system but I still want users to be able to search via metadata.

Now here is the kicker, It might be served on windows machine or a mac, either way... is it possible for the windows users to read/search the metadata off the mac or for the mac metadata to be translated to a windows server?
Paul O'Keefe is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old Mar 30th, 2006, 10:30 AM   #2
Full Citizen
 
Script Kiddie's Avatar
 
Join Date: Jan 2003
Location: Waterloo
Posts: 809
The file.
All spotlight does is harvest metadata from _files_
That being said, when spotlight searches for things it searches its database, but I assure you the comments you put on your files are indeed in the files.

Actually, you can see this by using the mdimport command like so
mdimport -d2 -n mr-burns.jpg
[... a bunch of kMDItem* stuff is outputted ...]

Now open mr-burns.jpg with the finder and click "get info" and add the comments "script kiddie says so"

repeat the mdimport command and see there is a new kMDItem like so

kMDItemFinderComment = "script kiddie says so.";

This mdimport command does NOT get stuff out of the database but looks directly at the file, so we have shown that comments (like other metadata) reside in the file.
__________________
.o0o.
Script Kiddie is offline   Reply With Quote
Old Mar 30th, 2006, 10:55 AM   #3
Full Citizen
 
Join Date: Jun 2005
Location: North Vancouver, BC
Posts: 197
Send a message via ICQ to Tiranis Send a message via AIM to Tiranis Send a message via MSN to Tiranis
Nevermind. (for now...)
Tiranis is offline   Reply With Quote
 
Old Mar 30th, 2006, 11:41 AM   #4
Full Citizen
 
Script Kiddie's Avatar
 
Join Date: Jan 2003
Location: Waterloo
Posts: 809
Here is something very interesting

1) If I copy mr-burns.jpg to mr-burns2.jpg from the terminal (using cp command) mdimport shows it does _not_ have the comments.
2) if I copy the file to another mac using scp from the terminal and use mdimport to see the comments are not there

However! if I copy mr-burns.jpg using the finder
1) locally
2) or to smb mounted volume on another mac
Then the metadata _is_ there!

So it looks like the answer to your question is:
It depends how the files are copied from one mac to another.
I'd bet copying to windows will make the metadata disappear.
__________________
.o0o.
Script Kiddie is offline   Reply With Quote
Old Mar 30th, 2006, 12:01 PM   #5
Honourable Citizen
 
madgunde's Avatar
 
Join Date: Mar 2006
Posts: 1,481
Comments are stored in the invisible .DS_Store file, and may be lost if transferred to filesystems that don't support resource forks (pretty much everything other than HFS/HFS+).

Just did a test. Copied a jpeg to a windows machine over the network, and it appeared normally. Then copied the same jpeg image, which contained comments to the same Windows machine, and the jpeg appears on the Windows machine with an invisible .DS_Store file. If I Get Info on the file on the Windows machine from my Mac, I see the comments. I then deleted the .DS_Store file from my windows machine, and after disconnecting and reconnecting to the Windows PC from my Mac and getting info, the comments were lost.

So basically, as long as the .DS_Store file remains on the non-HFS drive, Mac computers will be able to access the comments, but if the file is renamed or moved in Windows, the link will be broken and the comments lost. If only Mac computers ever manipulate those files, you will probably be OK.

You also have to make sure your backup software backs up the hidden .DS_Store files with the files. The .DS_Store files exist in every single folder where a file might exist which has comments. That file also exists on Mac hard drives as well. Now you know what it is for.

This knowledge-base article will be of interest to you:
http://docs.info.apple.com/article.html?artnum=107822
__________________
Mac User since 1989
MacBook Pro 15.4"/2.33GHz Core 2 Duo/4GB/250GB HD/256MB VRAM
Mac mini/2.0GHz Core 2 Duo/1GB/120GB HD
PowerMac G4 "Sawtooth"/1.4Ghz G4/1GB/2 x 120GB HD/64MB ATI Radeon 8500
iPhone 3GS 32GB on Rogers Canada

Master of the Art Of Geek.


madgunde is offline   Reply With Quote
Old Mar 30th, 2006, 02:33 PM   #6
 
Join Date: Jun 2005
Posts: 1,270
So let me see if I understand this:

• comments are NOT stored in the file to which you are adding comments.

• Instead comments are stored in the hidden .DS_Store in the folder the file resides in.

• Also spotlight searches a database for spotlight comments rather than search the files directly for their comments.

• windows systems can not read or search this metadata off a mac volume or server

• windows cannot read/search this metadata when files are copyied onto a windows volume/share/server

• macs can still read the comments from these windows volumes as long as the .DS_Store file is still in their folders

• you can't add comments to files on windows volumes (I'm still not clear on this from the knowledge base because it says you may... eventually)



Conclusion
Our massive spotlight-commented photo library can not at the moment be translated to a windows server in a way whereby windows users can search files via this metadata.

Thanks for your help everyone. Basically it looks like if we move to some sort of server-hosted image library solution I'll have to get a summer student to do the grunt work of reapplying keywords, comments, or some other form of metadata to the entire library in a way that is searchable to windows users.

Does anyone know anything about Picasa?
Paul O'Keefe is offline   Reply With Quote
Old Mar 30th, 2006, 05:53 PM   #7
Honourable Citizen
 
madgunde's Avatar
 
Join Date: Mar 2006
Posts: 1,481
That's right. File comments are a Mac-only feature and Windows cannot access it in any way (without some sort of third party utility anyway, not sure if any exist).

May I suggest using FileMaker Pro to catalog your photos? There may be other programs that are better suited, but FileMaker Pro would allow you to setup a database very easily which would be accessible via Windows or Mac clients. Of course, this does require each client to have a FileMaker Pro license, but it's a very scalable database system which can grow with your needs. It even allows you to publish databased to a web site, so people could search for images from a web page using FileMaker Pro as the back-end. Searches are very fast too.

Just a suggestion.
__________________
Mac User since 1989
MacBook Pro 15.4"/2.33GHz Core 2 Duo/4GB/250GB HD/256MB VRAM
Mac mini/2.0GHz Core 2 Duo/1GB/120GB HD
PowerMac G4 "Sawtooth"/1.4Ghz G4/1GB/2 x 120GB HD/64MB ATI Radeon 8500
iPhone 3GS 32GB on Rogers Canada

Master of the Art Of Geek.


madgunde is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to....open .cbr file gastonbuffet Mac, iPhone, iPad and iPod Help & Troubleshooting 2 Jun 15th, 2007 01:47 PM
metadata, spotlight & "flattening the file system" harrytse Anything Mac 13 Mar 31st, 2006 11:35 AM
Spotlight alternative? MacME Mac, iPhone, iPad and iPod Help & Troubleshooting 14 Feb 25th, 2006 04:55 PM
from 135 megs to 240 meg!? csonni Mac, iPhone, iPad and iPod Help & Troubleshooting 10 Nov 3rd, 2005 10:47 AM
Anyone else have Spotlight problems? jicon Mac, iPhone, iPad and iPod Help & Troubleshooting 0 May 3rd, 2005 11:59 PM


All times are GMT -4. The time now is 08:54 PM.



Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright 1999 - 2012, ehMac.ca All rights reserved. ehMac is not affiliated with Apple Inc. Mac, iPod, iTunes, iPhone, Apple TV are trademarks of Apple Inc. Content Relevant URLs by vBSEO 3.6.0 RC 2

Tribe.ca: Urban living in Toronto!