Join Scott Simpson for an in-depth discussion in this video Working with files and folders, part of Learning AppleScript.
…Chances are, if you're writing an AppleScript application,…you want to interact with files and folders.…First, let's take a look at how to create and delete folders.…On the Mac, the program called Finder interacts with the file system.…So we need to use the Finder dictionary…with an AppleScript to work with files and folders.…Just like before, I'll start out with the words, tell application.…And then Finder in double quotes.…The tell command starts a code block, and so I need…to write a line to end the block, or AppleScript will complain.…End tell.…Inside this tell block, I can write commands to talk to Finder.…
Looking at the dictionary, I can see that the Finder supports the Make command.…So, I'll use that, and I want to make a folder.…The Make command has a new specifier and it expects a class.…So, back in my code, I'll write, make new folder.…I'll run this and I'll switch over to Finder.…And on my desktop, you'll see Untitled…folder, that was just created by AppleScript.…And if I run this again, it will do…
- What is AppleScript?
- Using comments, variables, text, and numbers
- Working with files and folders
- Using conditionals and creating loops
- Building functions
- Controlling other programs with AppleScript
- Preventing and catching errors
- Distributing your AppleScript application
Skill Level Beginner
1. Exploring AppleScript
2. Using AppleScript with Applications
3. Your App in the Real World
4. Further Exploration
Folder actions2m 52s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.