Following Aliases

I have a folder that contains both files and aliases to other folders. I’d like to get a list of all the files, including those in the aliased folders. Entire contents just lists the aliases, it doesn’t follow them. How do I get the contents of the aliases?

Adam, with a very quick test this should give you the idea with finder.

set This_Folder to choose folder
tell application "Finder"
	set The_AFs to every alias file of folder This_Folder
	set x to original item of item 1 of The_AFs
	set y to files of x
end tell

“original item” is the missing link. “info for” will tell me if an item is an alias, then “original item” gets me there. Thanks Mark.

‘alias file’ in finder should also work. You would also need to test the original item for file or folder i presume