Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thomasp

macrumors 6502a
Original poster
Sep 18, 2004
654
1
UK
Hi,

I'm running OSX 10.4.2. I have a few thousand image files on my three HD's (on a Dual G4 - two internal, one external) and often need to find these image files by their filenames.

The trouble is, there are two possible starts to the filename, either "BC6V..." or "CRW_...", and the files can end in either .tif or .jpg.

If I just type in the number part of the filename (which follows the prefix), Spotlight refuses to find the file. The only way I can get Spotlight to find the file is to guess what the prefix was.

Sherlock in OS9 and Find in older versions of OSX used to match a string to filenames without a problem - why can't Spotlight?


Is there any way I can make spotlight search for the string of 4 numbers in the filename, and thus make it return useful results?


Sorry if I'm not being very clear, it's a little tricky to explain :)
 
Hrmm.....

I have files that use the '.' as the delimited

abc.123.defg

and if I tell spotlight to search '123', it picks it up just fine. move the file to your primary drive and see if it works on it. i wonder if spotlight indexs other drives.
 
No solution, but I can confirm the original problem....

I have files that start with dates in the filename, written in this format:

20050922 - rest of filename.ext

200509 will find all files with dates 200509xx but 0922 will not find files with 20050922 in the filename....
 
snkTab said:
Hrmm.....

I have files that use the '.' as the delimited

abc.123.defg

and if I tell spotlight to search '123', it picks it up just fine. move the file to your primary drive and see if it works on it. i wonder if spotlight indexs other drives.

Yes Spotlight does index the other two drives just fine.

Basically, like mkrishnan, if I wanted to find an image with the number string 1836 in it, the file could be called any of the following:
BC6V1836.jpg
BC6V1836.tif
CRW_1836.jpg
CRW_1836.tif

It's a bit annoying to have to put in the beggining of each filename, when you don't know it.


I'm surprised there isn't a plugin out there in PlugIn Land that fixes this.
 
thomasp said:
It's a bit annoying to have to put in the beggining of each filename, when you don't know it.


I'm surprised there isn't a plugin out there in PlugIn Land that fixes this.
I've noticed this, too. Bloody annoying, and really unnecessary. Why on earth should you have to enter the first letter/number? It's not even consistent: if I search for "photo", it'll find "Photoshop" and "iPhoto", but if I search for "hoto", it won't find either. What's that about?
:confused:
 
Quick and Easy Way:
Do Cmd + F in a Finder Window, then under the search parameters, select Name > Contains > and Kind > Images.

example2.jpg


Code Happy Way:
If you do Cmd + F in a Finder Window, then under the search parameters, select Raw Query (open the Kind menu, then select Other... then choose Raw Query from the dialogue box), you'll have much more flexibility in searching for wildcard modified terms.

For example, in the Raw Query field you can put:

Code:
(kMDItemFSName == "*1234*")

and your search will be limited to files with that sequence of numbers in the filename. You can further refine it by adding a second parameter on the same line, such as:

Code:
(kMDItemFSName == "*1234*") && (kMDItemFSName == "*.jpg")

Once you get the results you're after, save this as a Smart Search for future use. Everytime you open the Smart Search file, it'll display an up-to-date list of files matching that criteria.

example.jpg


Menu-bar Spotlight isn't setup for partial name searching (where the text for which you're looking is embedded in the file name, not starting it off.)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.