Applescript - how can I select all *non*-folders in an expanded list view window?
Unfortunately, Finder doesn't support revealing files in this way.

The following code sets 'theFiles' to the files in the directory chosen, but 'reveal' doesn't support any parameters. If you already have the window open, it selects the files in the root of the chosen folder in that window, but then opens a window for every other folder recursively.

tell application "Finder"
  set theFiles to get every item of (entire contents of folder (choose folder)) whose kind ≠ "Folder"
  reveal theFiles
end tell


I still feel like this is more of an XY problem though.