Mac Forums

Mac Forums (http://www.mac-forums.com/forums/)
-   OS X - Development and Darwin (http://www.mac-forums.com/forums/os-x-development-darwin/)
-   -   Auto Generated Application List (http://www.mac-forums.com/forums/os-x-development-darwin/188334-auto-generated-application-list.html)

noah_swanson 01-25-2010 08:45 AM

Auto Generated Application List
 
I recently had the catastrophic hard drive failure on my laptop. I now have a huge external drive that I use for TimeMachine on my Desktop and my Laptop. In order to save space backing up I want to exclude the applications folder and simply have a text file generated that will list all of the installed apps (and version-if possible). Then I would have this text file backed up instead of the xxGB sized applications folder.

Would this be easiest if done in a shell script, apple script, maybe automator can help?

Has anyone else done this? Any ideas?

Thanks!

clayneal 01-25-2010 08:51 AM

A question ? If you dont include your apps folder in the backup will you have any apps backed-up ? I may be wrong but you will not be saving hdd space as TM just keeps adding back ups till disk is full then starts deleting the oldest to continue. I am sure someone will come along to shoot me down or confirm but If it were me i would let time machine do its job.

Just my thoughts
Clay

noah_swanson 01-25-2010 09:02 AM

Correct, I'd have no Apps folder backed up. The apps really aren't my priority as far as retaining data since I have all of the media to install (sure it'll take more time to recover if the unthinkable happens again) but with a 1.5 TB backup and a desktop with 1TB and a laptop with 250GB, I'm sure it'll get full fast. No need to have the apps folder add more waste.

nabl 01-25-2010 02:18 PM

This is actually quite simple using System Profiler. Run this command from Terminal:
Code:

system_profiler SPApplicationsDataType > ~/Desktop/Applications.txt
This will output every single application on your computer to a file on the Desktop called Applications.txt. To refine it to just the applications in your Applications folder, try something like this:
Code:

system_profiler SPApplicationsDataType | grep "Location: /Applications" -B 7 > ~/Desktop/Applications.txt
It will output a generally nice list of applications. You could even refine that further to include other folders, such as ~/Applications. Also, you can change the path to output it wherever you like, including on your backup disk somewhere.

Throw that as a do shell script in an AppleScript, set it to run on a schedule with iCal, and you'll be good to go. Here are instructions that I gave in another thread on how to assign an application to a scheduled iCal event. Just replace making an Automator script with making an AppleScript (or even do make it in Automator with a Run Applescript action), and schedule it regularly for how often you want the file to be updated.

noah_swanson 02-23-2010 08:43 PM

Perfect! Never thought to use System Profiler...so obvious now.

Thanks again!


All times are GMT -4. The time now is 03:38 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.