Assuming you have the developer tools installed and that all your MS Word
files have the doc file type, in the terminal do
find ~/ -name "*.doc" -type f -exec /Developer/Tools/SetFile -t 'MSWD' {} \;
You may need to follow this with a
mdimport -r /Library/Spotlight/Microsoft\ Office.mdimporter
The file /Library/Spotlight/Microsoft\ Office.mdimporter/Contents/Info.plist
tells the file types currently understond by MS programs.
This may take a while. It worked for me when I created an mdimporter to
index elisp files.
--
oK+++
> In article <Pine.OSX.4.62.05...@fjgied.kei>,
> Obfus Kataa <va...@finhut.fi.example.com> wrote:
>
>> Assuming you have the developer tools installed and that all your MS Word
>> files have the doc file type, in the terminal do
>>
>> find ~/ -name "*.doc" -type f -exec /Developer/Tools/SetFile -t 'MSWD' {} \;
>> You may need to follow this with a
>> mdimport -r /Library/Spotlight/Microsoft\ Office.mdimporter
>>
>> The file /Library/Spotlight/Microsoft\ Office.mdimporter/Contents/Info.plist
>> tells the file types currently understond by MS programs.
>>
>> This may take a while. It worked for me when I created an mdimporter to
>> index elisp files.
>
> This is the equivalent of creating a Spotlight plugin for that file type?
Sorry, the last two lines of my original are a non sequitur. Tiger appears
to include the plugin /Library/Spotlight/Microsoft\ Office.mdimporter
because it is on my system which already had Office installed. That plugin
has a Propoerty list which tells the plugin what OSTypes it indexes. Those
types cover all Office documents. I also knew (from years' past problems)
that Office's OSType designations had changed (perhaps for Office X v1).
So I knew that older Docs would not be considered indexable.
The last two lines of my reply refer to my own attempts to write a plugin,
which finally worked, and how I figured out how to make it work partly by
reading the Property list for Office.
By the way, there is a non-apple program available in a package named
OSXuitls, but it will not compile on 10.4 using gcc4. A version compiled
with gcc3.3 will run on 10.4. The program is setfctypes by Sveinbjorn
Thordarson.
In the instructions I wrote, the 'find ~/ ...' searchs the user's home
directory and all its subdirectories for files with names that have the
final file extension of 'doc' (but not 'DOC' -iname would include those
too). For each file it finds, it executes the SetFile command with the
settype parameter of 'MSWD'. The next command, 'mdimport -r ...' tells the
indexing server (mds) to reimport and search through files that the plugin
supports. I believe in this case that is necessary because the files have
already been catalogued in the initial search and not assigned to this
importer.
--
oK+++