Re: Text items
Re: Text items
- Subject: Re: Text items
- From: "Fleisher, Ken" <email@hidden>
- Date: Tue, 16 Jan 2007 15:25:41 -0500
- Thread-topic: Text items
Kai,
Thanks for that clever script. I'm still trying to figure out exactly how it
works, but it does work and is just the sort of thing I was looking for.
I had tried to simplify my question and didn't give the full story though. I
tried to adapt your routine to what I need, but couldn't manage to get it to
work. I kept getting an empty list as a result!
Here's what I actually need to parse. Possible filenames are in the formats:
231-001_M.tif
231-001.tif
231-001.jpg
231-001-a_M.tif
231-001-a.tif
231-001-a.jpg
In these cases, I am looking to parse out "231-001" from the first 3 files
and "231-001-a" from the second 3 files. These are the only formats the
names will be, but the length of the portion that needs to be parsed is not
constant.
So besides stripping the ".xxx" extension, I need to strip "_M" if present.
How could I adapt your method to include this? As I said before, right now I
am just looping through every file. It's not necessarily too slow, I just
want to learn how to do it better.
Thanks a ton!
Ken
On 1/16/07 2:50 PM, "kai" <email@hidden> wrote:
> While the following routine still uses a repeat loop, it will repeat
> only as many times as there are different name extensions -
> regardless of how many filenames are actually involved.
--
Ken Fleisher
Photographer
Imaging & Visual Services
National Gallery of Art
Washington, D.C.
Phone: (202) 712-7471
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