This may be a filemanagerlib bug

This causes SD to hang and it has to be restarted.

It doesn’t cause SE to hang, but it might as well. The script indicates it’s running, but it doesn’t time out and it can’t be stopped and it cmmd-. won’t trigger an error.

use AppleScript version "2.5"
use scripting additions
use script "FileManagerLib"
set appFolder to (path to "apps") --'s POSIX path & "CoreTypes.bundle/Contents/Resources/"

set appFileNames to objects of appFolder ¬
	searching subfolders true ¬
	include invisible items false ¬
	include folders false ¬
	include files true ¬
	result type files list

After about 10 minutes SE let me stop the script

You’re just overwhelming AppleScript. You’re dealing with a list of probably tens of thousands of items, and AppleScript just doesn’t scale that well.

That’s what I figured.

For this particular issue I’ve gotten a list of apps and folders, and I’m getting the files from each.

Should would be nice to have a command like this:

every file of entire contents of thisFolder whose name_extension is "icns"

This came up before, I’ll try this. (I think I was still on 10.10 then.)