Name of every file in entire contents of folder - Doesn't work on Tige

	tell application "Finder"
			set the_list to get name of every file in (entire contents of theFolder) whose file type is "APPL"
		end tell

Hi MacScripter,

Can anyone with an OS that isn’t leopard run this and see if it works for them? I tried it on a tiger eMac and it just hung the Finder for ages and ages and then gave an error message I can’t remember.

If it’s not tiger-compatible, can anyone suggest a replacement?

Thanks,

Joe

Hi,

the error message was probably “Apple Event timed out”.
As the Finder has an element application file,
this is faster and the timeout error occurs at least after 10 minutes

tell application "Finder"
	with timeout of 10 * minutes seconds
		set the_list to name of every application file in entire contents of theFolder
	end timeout
end tell

Hi Joe and Stefan, I’m getting the error ‘The variable theFolder is not defined’ on Tiger 10.4.11 PPC.
My suggestion is – Stefan, please help. :smiley:

Tom

Yes, the error message was ‘Apple event timed out’. Thanks for your explanation stefan. I hope that works on Tiger. Unfortunately I don’t have a machine that doesn’t have leopard on to test (not that unfortunate really I guess :smiley: )

Tom, the variable has not been defined, Stefan left it open for me so I could put in whatever folder I want. The complete line to list the apps looks like this:

set the_list to name of every application file in entire contents of (path to applications folder)

:smiley:

I assumed that the script is only a snippet.
The variable is certainly defined in the complete version :wink: