Re: Efficiently searching for file name
Re: Efficiently searching for file name
- Subject: Re: Efficiently searching for file name
- From: John Delacour <email@hidden>
- Date: Tue, 8 Oct 2002 00:08:58 +0100
- Mac-eudora-version: 5.3 alpha
At 5:19 pm -0400 7/10/02, Brian Redman wrote:
You can use 'find /System -name 'Burgundy.* || true' if you want to
spare the cat pain.
Don't hold me on the applescript quoting conventions.
I won't even hold you to your own!
Here's your excellent solution properly quoted and made to output
non-alien pathnames. There's probably a far better way piping it to
tr, but I can't work it out.
All the same it does seem slow. I'm sure perl would do it far
faster, or doesn't that make sense?
set flist to do shell script "find /System -name 'TextS*' || true"
set dsk to ":"
set dsk to text 1 through -2 of ("" & alias dsk)
split("/")
set ls to text items of flist
split(":")
set flist to "" & ls
split(return)
set ls to text items of flist
split(return & dsk)
set flist to ls as string
split("")
return dsk & flist
on split(x)
set AppleScript's text item delimiters to {x}
end split
_______________________________________________
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.