Creating folders
The Finder dictionary includes the Standard Suite, which is a group of common AppleScript terms defined by applications. The Standard Suite includes the Make command. You can use the Make command to create folders, specify the location of the folder, and set properties of the folder. The following script creates a new folder on the desktop of your computer and sets the name and label of the folder: When AppleScript executes the Make command, the Finder returns a reference to the item. You can use this later in the script to work with the new item. The next example creates a new folder, then opens it:
Because the Finder will not let you give an item the same name as another item in the same location, your script should prevent this from happening. The next example uses the Exists command to do this: Related topic
|
|||
Table of contents |