get name of file with (on open) command

Hello, I’m wondering how I can grab the name of the file that drag onto the droplet.

Hi,

System Events (or the Finder) knows the name


on open theItems -- theItems is always a list of alias specifiers
	tell application "System Events" to set fileName to name of item 1 of theItems
end open

Thank you, it works perfectly. :slight_smile: