Re: Finding Filenames that contain a certain string
Re: Finding Filenames that contain a certain string
- Subject: Re: Finding Filenames that contain a certain string
- From: Luther Fuller <email@hidden>
- Date: Tue, 10 Jul 2007 14:14:04 -0500
I finally got time to explore this thread this morning. I already
know that an AppleScripted Spotlight search works VERY well provided
all you need is a graphical display of the results. I exclusively use
this for searches.
Nick Hearn's suggestion to use:
tell application "Finder" to set theFileList to (files of entire
contents of (choose folder) whose name contains theSearchString) as
alias list
should also work very well and has the advantage that the results are
in the script where you can continue to process them, if you wish.
So, I tried using 'mdfind' from Terminal just to see what I could
get. I used ...
mdfind -onlyin <path to Jun07DevDocPDF> kMDItemFSName = "bundle"
It did find 7 files whose name contains "bundle", followed by 100s
that do not. (A Spotlight search showed only the first 7 files.)
After trying variants of this command, decided that either 'mdfind'
is badly broken or the man page should be a lot longer.
Does anyone have more experience with 'mdfind'?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden