• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Pleas help with AppleScript's text item delimiter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Pleas help with AppleScript's text item delimiter
      • From: Walter Ian Kaye <email@hidden>
    • Re: Pleas help with AppleScript's text item delimiter
      • From: Paul Berkowitz <email@hidden>
    • Re: Pleas help with AppleScript's text item delimiter
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Newbie question: extracting records from lists
  • Next by Date: Re: Pleas help with AppleScript's text item delimiter
  • Previous by thread: Re: Newbie question: extracting records from lists
  • Next by thread: Re: Pleas help with AppleScript's text item delimiter
  • Index(es):
    • Date
    • Thread