Re: Need a fast answer to a basic finder prob.
Re: Need a fast answer to a basic finder prob.
- Subject: Re: Need a fast answer to a basic finder prob.
- From: Emmanuel <email@hidden>
- Date: Wed, 31 Aug 2005 16:49:16 +0200
At 4:06 PM +0200 8/31/05, Jay Louvion wrote:
Sorry for the panic but I just can't seem to work this one out by trial.
I got a variable, localfiles that returns an alias list:
{alias "Groucho:Users:ptilu:Desktop:dev AScript:scan renamer:short
test:51.10.jpg", alias "Groucho:Users:ptilu:Desktop:dev AScript:scan
renamer:short test:51.11.jpg", alias
"Groucho:Users:ptilu:Desktop:dev AScript:scan renamer:short
test:51.12.jpg", alias "Groucho:Users:ptilu:Desktop:dev AScript:scan
renamer:short test:51.13.jpg", alias
"Groucho:Users:ptilu:Desktop:dev AScript:scan renamer:short
test:51.14.jpg", alias "Groucho:Users:ptilu:Desktop:dev AScript:scan
renamer:short test:51._1.jpg", alias
"Groucho:Users:ptilu:Desktop:dev AScript:scan renamer:short
test:51._2.jpg", alias "Groucho:Users:ptilu:Desktop:dev AScript:scan
renamer:short test:51._3.jpg", alias
"Groucho:Users:ptilu:Desktop:dev AScript:scan renamer:short
test:51._4.jpg", alias "Groucho:Users:ptilu:Desktop:dev AScript:scan
renamer:short test:51._5.jpg", alias
"Groucho:Users:ptilu:Desktop:dev AScript:scan renamer:short
test:51._6.jpg", alias "Groucho:Users:ptilu:Desktop:dev AScript:scan
renamer:short test:51._7.jpg", alias
"Groucho:Users:ptilu:Desktop:dev AScript:scan renamer:short
test:51._8.jpg", alias "Groucho:Users:ptilu:Desktop:dev AScript:scan
renamer:short test:51._9.jpg"}
I need to return a shorter alias list from this list of only the
aliases containing "_", in order to replace those "_" by "0" (zeros).
And I just can't get it right. And I feel downright stoopid.
Tried: (wrapped in a "tell Finder")
set thelist to (every item of localfiles whose name contains "_") as
alias list
But hey, that would be just _too_ simple.
For such a small list, you can use a loop and: name of (info for
theFile) contains "_"
If the list was really bigger, you could use regular expressions,
after having coerced your list to text with return as the text item
delimiters.
Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden