• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finding Filenames that contain a certain string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Finding Filenames that contain a certain string
      • From: Axel Luttgens <email@hidden>
References: 
 >Finding Filenames that contain a certain string (From: David Bradley <email@hidden>)
 >Re: Finding Filenames that contain a certain string (From: "Mark J. Reed" <email@hidden>)
 >Re: Finding Filenames that contain a certain string (From: Nick Hearn <email@hidden>)

  • Prev by Date: Re: Detect if application is installed
  • Next by Date: Re: Detect if application is installed
  • Previous by thread: Re: Finding Filenames that contain a certain string
  • Next by thread: Re: Finding Filenames that contain a certain string
  • Index(es):
    • Date
    • Thread