• 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: Addressing the folder that contains an item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Addressing the folder that contains an item


  • Subject: Re: Addressing the folder that contains an item
  • From: Rob Jorgensen <email@hidden>
  • Date: Tue, 17 Sep 2002 13:45:05 -0400

On 9/17/02, Chad Chelius commented:

I am trying to figure out how to create a folder in the parent directory of
an item. For instance if I have a variable MyDirectory that contains the
path to a specific folder, how can I create a folder in the directory that
contains MyDirectory? MyDirectory is "Macintosh HD:Users:Chad:Temp" but I
want to create a new folder in the Chad folder based on my variable
MyDirectory. Thanks in advance.

This might work (tested with Jaguar):

tell application "Finder" to set newFol to make new folder of container of MyDirectory with properties {name:"Chad Sibling Folder"}

All one line - watch for email line wraps.

newFol will contain a Finder reference to the new folder.

--

Rob Jorgensen
Ohio, USA
_______________________________________________
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.

References: 
 >Addressing the folder that contains an item (From: Chad Chelius <email@hidden>)

  • Prev by Date: Search a file question - Mac OS 9
  • Next by Date: Re: text item delimiters
  • Previous by thread: Addressing the folder that contains an item
  • Next by thread: Search a file question - Mac OS 9
  • Index(es):
    • Date
    • Thread