Chapter 5. Controlling Files


Most people have a love-hate relationship with their computer. Sure, your Mac is a great tool for when you want to edit images or video, send and receive email, or play Halo. But your computer also serves as a digital file cabinet: a place where you can create and store files, move them around, organize them in folders, trash them when they're no longer needed, and copy them to another disk or computer on the fly.

Files, of course, are nothing more than individual packages of information that you keep on your hard drive. But for all the filing tasks they perform, most computer users tend to handle files manually: drag this file here, create a new folder there, and so on. After a while, these mundane tasks are what make people start to hate their computers.

If you're sick of dealing with your files one at a timeand taking up half your day in the processthere's no better tool in your arsenal than AppleScript. By commanding the Finder, AppleScript lets you:

  • Move all the files off your desktop in one fell swoop (Section 5.3.1.3)

  • Back up an important folder to a separate hard drive, just in case your computer dies (Section 5.4.1)

  • Rename all the files in a folderwithout having to type their new names individually (Section 6.4.1)

For these jobs and more, AppleScript can save you annoyance, tedium, andmost of alltime.

The example scripts from this chapter can be found on the AppleScript Examples CD (see Sidebar 2.1 for instructions).



AppleScript. The Missing Manual
AppleScript: The Missing Manual
ISBN: 0596008503
EAN: 2147483647
Year: 2003
Pages: 150

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net