Re: wildcard for directory selection
Re: wildcard for directory selection
- Subject: Re: wildcard for directory selection
- From: Andrew Oliver <email@hidden>
- Date: Tue, 08 Jul 2003 11:15:45 -0700
On 7/8/03 8:49 AM, "Matthew Galaher" <email@hidden> wrote:
>
I wish to be able to type the first x number of characters in a file
>
name in a dialog, and then have the finder select/open the first match.
>
So if I have directories named:
>
>
Volumes/Production/client/content/0073_foobar
>
Volumes/Production/client/content/0074_barfoo
>
Volumes/Production/client/content/0075_foobar
>
>
the dilalog would only need '0075' to open directory 0075_foobar
>
>
Is this something that would be best to have Applescript talking to
>
terminal.app?
>
IMHO, very few things are best done by having AppleScript talk to
terminal.app.
However, if you're asking if some kind of shell script integration would
work, then probably. I'd look at starting with 'locate' which can quickly
find files/folders in its cache:
do shell script "locate 0075 | head -1"
Will return the first hit in locate's database.
However, what's missing from your description is any concept of what
constitutes "first match". Are you talking oldest file (i.e. first file
created)? Newest file? File closest to the top of the directory tree?
Something else?
Andrew
:)
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.