Re: Applescript to search filenames
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