mdFind sensitive to search terms

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Simon Knight
Posts: 854
Joined: Wed Nov 04, 2009 11:41 am
Location: Gunthorpe, North Lincs, UK

mdFind sensitive to search terms

Post by Simon Knight » Tue Jun 11, 2019 4:36 pm

Hi,

I have been experimenting with using mdfind to find files (what else!) and have discovered that mdfind is quite picky on the search terms used. I am searching several drives that hold media and for unknown reasons some of these audio files have odd names. Specifically some of the names include two or more periods e.g. "MyGreatSong..mp3" or worse "MyGreatSong....mp3". Using the search term .mp3 excludes these multi period names where as searching for mp3 includes them.

While I have a solution I am curious as to why the files are being ignored. I know that in Terminal two periods mean go to parent directory but don't see how this would effect a search. Here are the results of a search using mp3 as the search term copied from Terminal. The text is UFT8 and has to be decoded when loaded into Livecode:

Code: Select all

/Volumes/TOSHIBA EXT/Audio_Media/SpokenWord/Horrible Histories - The Woeful Second World War - Terry Deary/11 Evil Evacuation - Stories About....mp3
/Volumes/TOSHIBA EXT/Audio_Media/SpokenWord/Horrible Histories - The Woeful Second World War - Terry Deary/12 1943_ Sinatra, Bouncing Bomb, Potatoes....mp3
best wishes
Skids

Post Reply

Return to “Mac OS”