• 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
Re: File name list help?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File name list help?


  • Subject: Re: File name list help?
  • From: AppleScript Guru <email@hidden>
  • Date: Sun, 07 Oct 2001 00:52:55 -0400

T.J ,

on 10/7/01 12:53 AM, you said:

> I'm working on a script which will make it easier to manipulate names of
> files for pasting into emails or word processors.
> I'd LIKE it to come out like this:
>
> item1, item2, item3

Try:

set theDelim to "," -- Or return
tell application "Finder"
set theSelection to (name of every item of selection) as list
set theText to ""
repeat with a from 1 to count theSelection
set theText to theText & (item a of theSelection)
if a  (count theSelection) then set theText to theText & theDelim
end repeat
end tell
set the clipboard to theText

-Ben

Benjamin S. Waldie
Write Track Media
(AppleScript GuRu)

AppleScript Web Site:
http://www.AppleScriptGuru.com
http://www.wtmedia.com


References: 
 >File name list help? (From: "T.J. Mahaffey" <email@hidden>)

  • Prev by Date: Re: MacOS X AS list (needed!)
  • Next by Date: Re: Set Selection with a list of items
  • Previous by thread: File name list help?
  • Next by thread: Re: File name list help?
  • Index(es):
    • Date
    • Thread