Displaying a filename

Ok, I may be new to this but I feel pretty dumb right now.

All I want to do is to display the filename of a file dropped into a folder (as part of my debugging process for a different script).

Any idea why this doesn’t work?

Thanks.

Phil


on adding folder items to thisFolder after receiving addedItems
	
	       repeat with anItem in addedItems
		   display dialog the name of anItem
		end repeat
	
end adding folder items to


Hi,

only the Finder and System Event know the name of a file.
An alternative is info for of Standard Additions


on adding folder items to thisFolder after receiving addedItems
	
	repeat with anItem in addedItems
		display dialog the name of (info for anItem)
	end repeat
	
end adding folder items to