Re: Toggling case insensitivity in AKUA's "whose names match"
Re: Toggling case insensitivity in AKUA's "whose names match"
- Subject: Re: Toggling case insensitivity in AKUA's "whose names match"
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 23 Dec 2000 15:00:54 -0800
On 12/23/00 2:29 PM, "Roger Howard" <email@hidden> wrote:
>
Hi there,
>
>
I am using AKUA Sweets to search a directory structure for a filename
>
containing a given string... I use the "whose names match" switch in the
>
"the entries in" command like this:
>
>
First I construct a wildcard str to match the filenames like this:
>
>
set wildStr to ("*" & thisStr & "*") as string
>
>
Then I search like this:
>
>
set matchFiles to the entries in rootFolder whose names match wildStr to
>
a depth of searchDepth as alias
>
>
The only issue with this is that it matches only files whose names match the
>
case of the original string (thisStr) and none else. I need this to be case
>
insensitive.
>
>
Obviously my problem is in the formatting of my wildcard string, but I have
>
tried several additions to it with no luck. I know this is simple so I don't
>
want to get hung up on it... I have tried several different uses of the "%"
>
flag (thinking backing to my reg expressions) but I may have made an error.
>
Please help!
>
>
Thanks, please respond directly (as well as to the list) if possible,
>
This works for me:
set wildStr to ("%*" & thisStr & "*")
You don't even need "as string" since that formulation will always be a
string, even if 'thisStr' starts out as a list.
--
Paul Berkowitz