This will strip out paths that Automator passes. Useful for listing files in documents. (thx: Bruce Phillips)
set filenameList to {}
set ASTID to AppleScript's text item delimiters
set AppleScript's text item delimiters to {", "}
tell application "Finder"
launch
repeat with thisFolder in input
set filenameList's end to (name of every item of thisFolder) as Unicode text
end repeat
end tell
set AppleScript's text item delimiters to {ASCII character 10}
set the clipboard to filenameList as Unicode text
set AppleScript's text item delimiters to ASTID