Using TextWrangler to List Files in Nested Folders (from Mark Hunte)

There are lots of AppleScripts for recursively digging down through the contents of a folder, organizing the results by subfolder and presenting them as text. This one in a thread by Mark Hunte, uses TextWrangler and some GUI scripting to do it with a huge speed advantage over plain vanilla AS.

-- Mark Hunte: "Prepare Document to List Files in Folder"

tell application "Finder"
	set selec to (choose folder) as alias
	set conta to POSIX path of selec
end tell
tell application "TextWrangler"
	activate
	make new text document
	tell application "System Events"
		tell process "TextWrangler"
			click menu item "Folder Listing." of menu 1 of menu item ¬
				"Insert" of menu 1 of menu bar item "Edit" of menu bar 1
			keystroke "g" using {command down, shift down}
			keystroke conta
			repeat 2 times
				keystroke return
			end repeat
		end tell
	end tell
end tell