• 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: new folders?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new folders?


  • Subject: Re: new folders?
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 17 Feb 2002 21:12:37 -0700

On Sunday, February 17, 2002, at 10:23 PM, dave wrote:

I would very much like to know how to tell the finder to create new folders,
or how to display dialogue. I haven't had much luck trying to find out.
Could anybody help me out with a couple of lines of code?

Try this:

(*
get the name of the parent folder
i.e., the folder in which to create the new folder
*)

set the parentFolder to choose folder with prompt "Where do you want to create the new folder?"

(*
Enter the name of the new folder.
*)

set the newFolderName to (text returned of (display dialog "Enter the new folder's name." default answer "" with icon note))

(*
Tell the finder to create the folder.
*)

tell application "Finder"
make new folder with properties {name:newFolderName} at parentFolder
end tell

Of course, instead of using the dialogs, you can programatically define the path and folder name.

--Michelle
_______________________________________________
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: 
 >new folders? (From: dave <email@hidden>)

  • Prev by Date: Wow, this is strange...
  • Next by Date: Re: Merging Columns in Excel
  • Previous by thread: [FOR NEW USERS] (was Re: new folders?)
  • Next by thread: Re: new folders?
  • Index(es):
    • Date
    • Thread