Notification when user opens a certain folder in Finder I am really in need of a way to find out what window Finder is looking at so for example, if the user opens a certain folder I can get a notification. Is this possible?
Create an AppleScript file with the content

on opening folder theAttachedFolder

    do shell script "echo 'The folder \"folder name\" has been opened' | mail -s 'folder opened' 'name@sld.tld'"

end opening folder


replace folder name in  \"folder name\" with the real folder name, enter a proper email address in the .scpt file and save it to /Library/Scripts/Folder\ Action\ Scripts.

Then configure a folder action with this script by attaching it to the monitored folder. If mail ... doesn't work in your environment you have to use another CLI mail client. With a working OS X/macOS Server and its configured and running mail server and respective user accounts it works right out of the box.



More advanced version which requires to insert an email address only:

on opening folder theAttachedFolder

    set theFolder to quoted form of POSIX path of theAttachedFolder
    set Username to quoted form of short user name of (system info)

    do shell script "echo 'The folder " &amp; theFolder &amp; " has been opened by " &amp; Username &amp; "!' | mail -s 'Monitored folder opened' 'name@sld.tld'"

end opening folder