This is mostly a test so that I can work up to the function that I want to create down the line. I'm very new to AppleScript so bear with me!
I wrote this as an attempt to test a folder action that receives a new file and then displays an alert with the name of the newly added file.
This Script was saved to ~/Library/Scripts/Folder Action Scripts
. And then assigned to a folder on my desktop called Return Name. I see the script run when a new item is dropped in but nothing happens.
Can anyone just explain to me what is wrong here?
Thanks!
on adding folder items to InputFolder after receiving NewItem
tell application "Finder"
set FileName to name of NewItem
activate
display alert "New Items Added!" message ("File called " & FileName & " have been added" as string)
end tell
end adding folder items to
Best Answer
This should work for you