Re: Get a list of applications
Re: Get a list of applications
- Subject: Re: Get a list of applications
- From: John Delacour <email@hidden>
- Date: Sun, 6 Jul 2003 23:04:10 +0100
- Mac-eudora-version: 6.0a16
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.
Tanaka's osax under the old regime would do this sort of thing very
fast. Even if there is a way with find in the shell, it's
horrendously slow, and using 'entire contents' in the Finder just
freezes things up in the OS I'm using. I tried Jon's 'walk folders'
and that was as bad _OMM_.
This straightforward AS script will search for apps at the root level
and one level down, and it's not too awfully slow.
tell app "Finder"
set _appFolder to the folder "Applications" in the startup disk
set ls to name of files in _appFolder whose file type is "APPL"
set _folders to folders in _appFolder
repeat with f in _folders
try
set ls2 to (name of files in f whose file type is "APPL")
repeat with _app in ls2
set end of ls to _app as Unicode text
end
end
end
end
ls
_______________________________________________
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.