Register FAQ/Rules Forum Spy Search Today's Posts Mark Forums Read

Welcome to the Mac Forums forums. Please read the FAQ if you have questions. Register to participate.

 
Go Back   Mac Forums > Apple Software > Mac OS X Forums > Mac OS X
TouchArcade.com - iPhone Game Reviews and News

Reply
 
Thread Tools Search this Thread Display Modes
Old Nov 14, 2009, 12:20 PM   #1
bollweevil
macrumors regular
 
Join Date: Feb 2008
Is there an "Advanced Search" in Finder?

Okay, I have wanted this so many times that I am going to ask you all.

Is there an "Advanced Search" capability in Finder? I have found the preferences, and the +/- buttons that allow you to add multiple search fields, but this is not enough. I want "and" and "or" conditionals connecting the multiple search fields/criteria. I also DESPERATELY want the ability to search in all subdirectories of directory foo, or just look at files in the directory foo itself. I also really want "is not" for the search fields, instead of just "is". For instance, right now I am looking for " filename is '.py' ", but I really want to add the conditions " do not search subdirectories " and " filename is not 'music' ", because I am seeing all 2000 .py scripts from subdirectories and 500 py scripts with 'music' in the filename which I know I don't want.

I would love to be able to use Unix path syntax, like foo/*.py, and ~/foo/*.py.

Regexen would be AWESOME: e.g ^[a-bA-B0-9\./]*/[a-b]*.py$ this regex would find any .py files and NO .pyc files, but only .py files without digits or uppercase in the filename.

Do people know of a way to tackle any of these?
bollweevil is offline   Reply With Quote
Old Nov 14, 2009, 01:52 PM   #2
Eric S.
macrumors 68030
 
Eric S.'s Avatar
 
Join Date: Feb 2008
Location: Santa Cruz Mountains, California
Terminal commands can probably do everything you want. For example, if you want all files in the current directory ending in ".py" but not including "music" in their name:

ls -1 *.py | grep -v music

If you want to recursively search a directory tree, the find command can be used:

find . -name "*.py" -exec ls -1 \{\} \; | grep -v music

The ls and find commands can both use regex patterns. You can run "man ls" and "man find" and check out how those work.
__________________
laptop: aluminum MB 2.4GHz/4GB/250GB/9400M, 10.5.8/XP Pro
desktop: Core i7 920 2.66GHz/4GB/640GB/XFX GeForce 9600 GSO, 10.6.2
previous: Mac Plus, IIci, PB 100, Quadra 840av, PowerMac G4, iBook G3/G4
Eric S. is offline   Reply With Quote
Old Nov 14, 2009, 02:20 PM   #3
bollweevil
Thread Starter
macrumors regular
 
Join Date: Feb 2008
Thank you Eric, but what I really desperately want is a nice GUI to do this. I got the ideas from using ls and find, in fact. The problem with ls and find is that I get a list, but a plain text list is not so easy to sort by 'Last opened' and then resort by 'size', and then right click on one of the files.

I hesitated to ask this question because it will only save me 30 seconds relative to using terminal each time, but those 30 seconds really add up over dozens and hundreds of searches that I do.

Do I want Google Desktop or something?
bollweevil is offline   Reply With Quote
Old Nov 14, 2009, 05:23 PM   #4
haginile
macrumors newbie
 
Join Date: Dec 2006
Press "Option" and then click on the + button (should be shown as ...)
haginile is offline   Reply With Quote
Old Nov 15, 2009, 03:56 AM   #5
bollweevil
Thread Starter
macrumors regular
 
Join Date: Feb 2008
Thanks Haginile, that is excellent. That answers one of my questions, and makes the entire thread worthwhile, I now know how to in effect do "is not" and "or" as well as the standard "is" and "and".

Other questions remain. Especially: How do I search non-recursively, for only the immediate contents of this directory.
bollweevil is offline   Reply With Quote

Reply

Mac Forums > Apple Software > Mac OS X Forums > Mac OS X

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 05:56 PM.

Mac News | Mac Rumors | iPhone Game Reviews | iPhone Apps

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 2002-2010, MacRumors.com, LLC