Auto-generate an application list for backup purposes

Nov 30, '06 07:30:02AM

Contributed by: teamloco

I, like many others, have lost data due to insufficient (read: none) backups. I am now religious about backups, and have been using LaCie's Silverkeeper to back up my files nightly. All seemed well until recently I had another hard drive failure. I wasn't worried about my home folder, since the whole thing gets backed up, but I did lose all my applications. For the larger ones, you have a box or physical CD, so this isn't a big deal. However, all the neat share - free - donationware I get from various places was gone! I could trace back through preference files, application support folders, or try to remember. This was not ideal.

So I patched together the following simple AppleScript, which I run at startup. It outputs the ls command to a text file in my Documents folder, which is backed up nightly. I can then use this to recount all the applications I may have forgotten about. Paste this code into Applescript:

do shell script "ls /Applications >~/Documents/apps.txt"
I saved mine as an application, and then added it to my login items in the Accounts System Preferences panel.

As many have said before, I am not a scripter and have no real idea what I'm doing. I would have loved to make this a bash script that ran in the cron jobs, but I'm not that smart to figure it out. Also the list isn't formatted very well, and it leaves the .app extension intact. Nonetheless, this will help me remember those obscure applications I use in the event I have (eek!) another hard drive failure.

[robg adds: Converting this to a cron task that runs every hour or twice a day wouldn't be hard at all -- however, in the interest of accuracy, I'll let a commenter with more Unix skills than I take on that task! If you have applications you store in more than one location, you could add additional lines to the AppleScript, but use two greater-than signs to append the data to the existing file: do shell scdript "ls /Volumes/myapps >>~/Documents/apps.txt"]

Comments (13)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20061126015107894