Flamed? Seriously? I offered a solution that used the shell, and you said this:
No need for a shell script here. Plain vanilla appleScript works just fine,
and may even be faster.
And here's what I said:
It's that expressiveness thing again. Having to list out all 26
possible prefixes strikes me as clunky, to say the least. Now if all
the OP needs is really ` name of file starts with "l325010" ', then
doing a loop and a check with vanilla AS is reasonable. But if it
really does need to worry about excluding files that start with
l325010 followed by something other than a lowercase letter, the brute
force approach starts to get untenable pretty fast. So I would do it
with the shell, but the Satimage OSAX also has regex capabilities that
are more than equal to the task. I just don't think vanilla
AppleScript is the right tool here.
Yeah, time to break out the asbestos pajamas...
Then you continued:
> Since this is the AppleScript users list I think it's perfectly reasonable
> to recommend AppleScript solutions. Not everyone has learned shell scripting
> or uses "do shell script" or wants to or needs to. I think appleScript
> novices may be getting misleading information if every simple scripting
> question is answered with only shell scripting solutions.
To which I replied:
Ed: That's twice now you've said something about there being too many
shellscript replies on here; I think you are both succumbing to
selective attention and overreacting.
So far I'm not seeing the flames.
I freely admit that my late-night reply to Michelle veered well into Napalm territory, which she absolutely did not deserve, but by then we were dozens of messages in and I was under the influence of Rowling. (Sorry again, Michelle).
But I'm pretty sure the first to cast aspersions upon the opposition was you, in fact, with your Oz analogy accusing us UNIX-background-types of harboring disdain for y'all Mac-OS-background types, which I think is patently false.
And I still think it's selective attention to think that every simple question is answered with a "do shell script", and will continue to think that until someone produces numbers indicating otherwise. And even when a "do shell script" solution is offered, it's usually only one of several useful replies, many of which have no shell at all.
I don't care if people program in nothing but AppleScript their whole life or if they learn a new scripting language every day over lunch. I've never once said that people need to learn the shell or anything else to use AS. I have merely offered solutions that happened to take advantage of the shell because I feel those solutions were an appropriate solution to the problem. In the unlikely event that the shortest solution to copy and paste into Script Editor involves piping grep to grep -v to awk to sed, then that's what I'll offer. If you want to continue complaining, that's your right, but I think this discussion has shown that there's more than sufficient support among the subscribers to this list for the position that solutions using do shell script are perfectly acceptable on this list.
Even if the OP is a newbie.
Even if there's a way to do it without the shell. (There's always a way to do it without the shell; Applescript is Turing-complete, so it can by definition do anything. That doesn't mean I would recommend, say, using its text manipulation commands to implement arbitrary-precision decimal arithmetic, but it's possible.)
Even if the non-shell way to do it is, in the eyes of one Ed Stockly, the better solution. Great - offer your alternative. But I'm not going to refrain from offering the shell-based one, or wait to make sure the "pure" Applescript crowd gets their licks in first.