• 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: Folder name from alias
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Folder name from alias


  • Subject: Re: Folder name from alias
  • From: "Marc K. Myers" <email@hidden>
  • Date: Fri, 08 Dec 2000 11:32:21 -0500
  • Organization: [very little]

Rick Plummer wrote:
> Date: Thu, 07 Dec 2000 23:48:26 -0600
> From: Rick Plummer <email@hidden>
> To: email@hidden
> Subject: Folder name from alias
>
> I need script that will extract the folder name of a folder
> dropped on an applet (for use later inthe script).
>
> e.g.:
> on open x
> tell application "Finder"
> yada
> yada
> make new folder at (location) with properties
> {name:<folder name from x>}

on open (itemList)
set fldrPath to (item 1 of itemList) as text
set {oldDelims, AppleScript's text item delimiters} to [optn-L]
{AppleScript's text item delimiters, ":"}
set theName to text item -2 of fldrPath
set AppleScript's text item delimiters to oldDelims
tell application "Finder"
make new folder at <location> [optn-L]
with properties {name:theName}
end tell
end open

Note to group: How about using "[optn-L]" in place of the continuation character?

Marc [12/8/00 11:29:51 AM]


  • Follow-Ups:
    • continuation character [was Folder name from alias]
      • From: SemiColon <email@hidden>
  • Prev by Date: Apple system profiler - script
  • Next by Date: Re: Scripting Sherlock
  • Previous by thread: Re: Folder name from alias
  • Next by thread: continuation character [was Folder name from alias]
  • Index(es):
    • Date
    • Thread