Re: Coerce file reference to text
Re: Coerce file reference to text
- Subject: Re: Coerce file reference to text
- From: kai <email@hidden>
- Date: Thu, 11 May 2006 03:46:50 +0100
On 10 May 2006, at 16:08, Sam wrote:
I've checked around this list and want to extract a POSIX like,
(but not POSIX because the file reference is fine as is without the
colons) file path.
I like the getting every file of the folder because I can modify it
to just get Quark files.
But I'm getting file references that I cannot make into strings so
that I can delimit them the way I want.
Is there a better way to get "SeverVol/Job Folder/
Quark_file_I_want"? I keep coming up missing it or errors that the
file reference can't be text.
Try something like this, Sam:
-------------
set f to choose folder
set d to text item delimiters
set text item delimiters to return
tell application "Finder" to set l to (f's files whose ¬
file type contains "XPR") as Unicode text
set text item delimiters to ":"
set l to l's text items
set text item delimiters to "/"
set l to paragraphs of (l as Unicode text)
set text item delimiters to d
if (count l's item 1) is 0 then set l to {}
l
-------------
If you really want plain text strings, then just remove the 2
occurrences of 'Unicode' (leaving the 'text').
---
kai
_______________________________________________
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