Look here Spotlight
Here's an open question -- is it possible to force Spotlight (in OS X 10.4) to index a particular file type or directory location? I ask because I have a whole bunch of *.csv files, which are essentially just text files, but for whatever reason Spotlight totally ignores them. All queries for a value inside a .csv return nothing. Anyone have a tip?
Comments
One thing that should work is forcing the file type to "TEXT". If you have the developer tools installed, you can execute the following in Terminal:
$ /Developer/Tools/SetFile -t TEXT *.csv
Posted by: Christopher Elkins
at September 25, 2005 3:24 PM
A-ha! Your suggestion led me to where the problem was. I downloaded a freeware batch file type & creator code changer and ran all the CSVs through it. And as soon as they became TEXT, Spotlight grabbed every query I tried. Thanks for the tip!
Posted by: Todd Dominey at September 25, 2005 5:15 PM
What was it that you used Todd?
Posted by: Nathan Nutter at September 26, 2005 1:18 AM
I used this:
Posted by: Todd Dominey at September 26, 2005 8:27 AM
I have another spotlight related question:
I regularly employ "apple-f" to launch a finder window. Unfortunately, the window that opens doesn't have any history with regard to position and size, and always launches far smaller than where I left it the last time I launched it.
Anyway to have it retain it's position & size states?
Posted by: jojo at September 26, 2005 1:52 PM
(Sorry, that should have said I use the "apple-f" key combo to launch a spotlight window in the finder)
Posted by: jojo at September 26, 2005 1:53 PM
Just a thought... Command-F, then change the options to Name, ends with, and your file extension... hit return and voila!
Works for me...
Posted by: Doug Miller at September 26, 2005 7:50 PM
The problem is that Spotlight has to know what type of file it is in order to know which plugin to call for indexing the file. It doesn't know what ".csv" files are, though. As someone else mentioned, setting the HFS filetype to TEXT will cause Spotlight to treat it as a plain old text file and index it like one. (Spotlight can check either filename extensions or the classic HFS file type/creator type info on a file in order to determine its type.)
The other way to fix it would be for someone to write a plugin for .csv files, or to hack spotlight's definition of text files so that it would know that files with a .csv extension should be indexed using the plain text indexer.
Posted by: Tim Buchheim
at September 27, 2005 2:00 PM
Yea Doug that worked for me to thanks !!!
Posted by: Jessica at November 17, 2005 12:02 AM
Does it fixed now?
Posted by: Dmitriy at December 18, 2005 10:43 AM
