Hack 10 Recent Filenames

figs/beginner.giffigs/hack10.gif

Mac OS X has some tricky ways of remembering which files were used recently.

Did you know that OS X applications don't actually remember the names of recent files you've opened? That's not to say that they don't recall what you've been editing; after all, Open Recent does work rather nicely.

What the application remembers is the location of the file on disk. Rename that file. Change its file extension. Move it somewhere else entirely. Just as long as it's still on the same disk (inodes don't transfer from disk to disk), your app should be able to find it the next time you choose Open Recent.

Just how this is implemented varies from application to application. Starting with a file called somefile.txt on my Desktop, I did a little experimenting. Move, rename, and tamper with it as I might, BBEdit continued to list it as Hard Drive:Users:rael:Desktop:somefile.txt. Preview noticed a rename of somefile.tiff to someotherfile.tiff. Microsoft Word, like BBEdit, insisted somefile.doc was still somefile.doc, despite its being renamed someotherfile.doc and moved elsewhere.

Why's this useful? Let's say you've created a marvelous piece of poetry, saved it to the Desktop in a hurry as your plane lands, later renamed it to something more appropriate than Untitled1.doc, and moved it somewhere or other. Sure, Sherlock may be able to find it if you search by content, date changed, or document type. Or you could simply relaunch the app you believe you were using at the time, select it from the list of recent files, and you're off to the races.



Mac OS X Hacks
Mac OS X Hacks: 100 Industrial-Strength Tips & Tricks
ISBN: 0596004605
EAN: 2147483647
Year: 2006
Pages: 161

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