Re: Get a list of applications
Re: Get a list of applications
- Subject: Re: Get a list of applications
- From: Lewis Butler <email@hidden>
- Date: Fri, 8 Aug 2003 12:00:09 -0600
On Sunday, 06 July 2003, at 16:04, John Delacour wrote:
At 2:48 pm -0600 6/7/03, Lewis Butler wrote:
On Sunday, Jul 6, 2003, at 10:31 Canada/Mountain, Tom Jones wrote:
I would like to get a list of all of the Applications in the
/Applications folder..
do shell script "ls -1 /Applications"
No, but there must be a way with find in the shell. I can't see a way
in man find to get just executables.
find /Applications -perm +001 -maxdepth 1
will find all the files in /Applications that are executable by anyone.
Trouble is, it finds directories too. And since .app bundles are
directories, there really is no way to distinguish, say,
/Applications/someApp.app from /Applications/Utilities
find /Applications -perm +001 -name "*.app"
will find just the .app bundles and will search all levels.
BTW, adding a -maxdepth makes find much much faster.
find /Applications -perm +001 -name "*.app" -type d -maxdepth 3
This straightforward AS script will search for apps at the root level
and one level down, and it's not too awfully slow.
It seems the best possibility at this point though, unless a syntax
like:
set myApps to every file of _appFolder whose file type is "APPL" with
depth of 5
is forthcoming...
--
There's nothing to do, so you just stay in bed [ah, poor thing] Why
live in the world when you can live in your head?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.