making alias of all the *.app files in my app folder

Hi I am trying to create a folder of alias of all make applications i was thinking I could do a shell script and use locate but I don’t know how to put my results into a folder and when i tried to narrow it done to just my application folder it went and open all the app packages and printed out the frameworks inside.

ANY IDEAS:D

Hi Tom,

welcome at MacScripter

try this:


set appFolder to choose folder with prompt "choose folder containing the applications"
set aliasFolder to choose folder with prompt "choose folder to put in the alias files"
tell application "Finder"
	repeat with oneApp in (get items of appFolder whose name extension is "app")
		make new alias file at aliasFolder to oneApp with properties {name:name of (info for oneApp as alias)}
	end repeat
end tell

ok so i tried it it works except there not alias, and it didnt open the folders in side applications. i need it to open eclipse folder and find the app in there and so on

Try this. First create the receiving folder (mine is tApps). This isn’t fast!

set tApps to alias ((path to desktop folder as Unicode text) & "tApps:")
set L to paragraphs of (do shell script "mdfind -onlyin /Applications/   'kMDItemContentTypeTree ==  \"com.apple.application\"'") -- this part is very fast.
repeat with anApp in L
	set tFile to POSIX file anApp
	tell application "Finder" to make new alias at tApps to tFile -- this part is very slow.
end repeat

Not sure why that script is slow, unless you have a ba-zillion apps that I don’t have. I figure the Finder responds better to its “native tongue,” and so wrote this that screamed through 77 apps in my Applications folder in just a few seconds:

tell application "Finder"
	set theAppFolder to folder "applications" of the startup disk
	set theAliasFolder to folder "apps" of the desktop
	set theApps to (application files of theAppFolder)
	
	repeat with anApp in theApps
		make new alias file to anApp at theAliasFolder
	end repeat
end tell

EDIT: missed that we also needed to get apps in subfolders. This version got all 226 items in Applications and in Utilities (and other subfolders) in about 30 seconds on my 466 G4.

tell application "Finder"
	set theAppFolder to folder "applications" of the startup disk
	set theAliasFolder to folder "apps" of the desktop
	set theApps to (every application file of entire contents of theAppFolder)
	
	repeat with anApp in theApps
		make new alias file to anApp at theAliasFolder
	end repeat
end tell