I'm creating a folder action to display a notification when a new file is downloaded and would like the notification to display the filename. I can't figure out how to extract the filename of the downloaded file and pass it on to the variable.


Try something like this:



  • Folder action receives files and folders to Downloads(default Folder Action script)

  • Run Applescript:

    on run {input, parameters} tell application "Finder" set filename to name of file input end tell end run

  • Set value of Variable: fileName

  • Ask for Confirmation: Title: Alert! The file fileName has been downloaded! Body: A new file has downloaded

So if I add a file named "NewFile.png", I get: Example

| improve this answer | |
  • 2
    Alternatively, you could also use a "Display Notification" action, which would be less obtrusive. – aaplmath Jul 19 '15 at 15:24
  • That would work as well. – SentientBacon Jul 19 '15 at 15:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .