• 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: Michelle Steiner <email@hidden>
  • Date: Thu, 7 Dec 2000 22:59:43 -0800

On 12/7/00 9:48 PM, Rick Plummer <email@hidden> wrote:

>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>}

Some of this code is for illustration purposes only

on open {theitem}
(*
braces force only first item to be passed; this assumes that you will be
dropping only one item at a time on the droplet.
*)

if folder of (info for theitem) then
set {text item delimiters, OTID} to {":", text item delimiters}
set folderName to text item -2 of (theitem as text)
set text item delimiters to OTID
display dialog folderName --just to show that it works.
else
--handle files as you need
end if
end open

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | Hard as it may be to believe, my |
| email@hidden | life has been based on a true story. |
----------------------------------------------------------------------


  • Follow-Ups:
    • Re: Folder name from alias
      • From: Allen Watson <email@hidden>
    • Re: Folder name from alias
      • From: SemiColon <email@hidden>
  • Prev by Date: Folder name from alias
  • Next by Date: Re: Folder name from alias
  • Previous by thread: Re: Folder name from alias
  • Next by thread: Re: Folder name from alias
  • Index(es):
    • Date
    • Thread