• 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: Applescript to search filenames
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescript to search filenames


  • Subject: Re: Applescript to search filenames
  • From: Gnarlodious <email@hidden>
  • Date: Fri, 1 Dec 2006 19:08:22 -0700

Justto expand on what mark said, here is a script I use to launch a
shell search:


property fileExt : "*.*" tell me to display dialog "Filename?" default answer fileExt set fileExt to the text returned of the result

set inFolder to choose folder

set cmd to "find " & POSIX path of inFolder & " -type f -name '*" &
fileExt & "' 2> /dev/null"

tell application "Terminal"
	if not (exists window 1) then do script ""
	do script cmd in front window
end tell


-- Gnarlie


On 12/1/06, Mark J. Reed <email@hidden> wrote:
I don't want to sound like a "Shell rules, AppleScript drools" type,
which I'm not, but it seems to me that a find(1) command might be a
better way to handle this situation.

For example,

                        find /starting/path -type d -name '* *' -print

will find all folders whose name contains a space.

What constitutes a legal vs illegal filename according to your conventions?
--
Mark J. Reed <email@hidden>
_______________________________________________
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/mailman//archives/applescript-users

This email sent to email@hidden
References: 
 >Applescript to search filenames (From: "David Green" <email@hidden>)
 >Re: Applescript to search filenames (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Filemaker 8 Help - Find a record
  • Next by Date: Re: Applescript to search filenames
  • Previous by thread: Re: Applescript to search filenames
  • Next by thread: Re: Applescript to search filenames
  • Index(es):
    • Date
    • Thread