Pleas help with AppleScript's text item delimiter
Pleas help with AppleScript's text item delimiter
- Subject: Pleas help with AppleScript's text item delimiter
- From: Richard Rönnbäck <email@hidden>
- Date: Sun, 14 Sep 2003 08:03:40 +0200
I am planning to use the "do shell script" command for finding different
kind of files, which works very nice and very fast but the result is a
string in which found files are separated by a line break.
I haven't had the need to use AppleScript's text item delimiter before and I
can't really get it to work, although I think it should
Here is the basic script:
set myFolder to quoted form of (POSIX path of "Macintosh
HD:Users:richardr:desktop")
set theFiles to (do shell script "find " & myFolder & " -name *.jpg")
Here is the script when I tried to change the item delimiter:
set myFolder to quoted form of (POSIX path of "Macintosh
HD:Users:richardr:desktop")
set myOldDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to "
"
set theFiles to (do shell script "find " & myFolder & " -name *.jpg") as
list
-- doesn't work, still returns a string so I can't do
item 1 of theFiles
set AppleScript's text item delimiters to myOldDelimiters
_______________________________________________
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.