Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A script to provide Growl notices on folder modification Desktop
I keep my Public Drop Box folder and a Samba share online all the time when I'm on the college network, and occasionally someone will drop files into either. Sometimes I won't notice for a while afterwards, which is annoying if it's big or I need to organise the folder better. So I wrote this Folder Action AppleScript that pops up a Growl notification whenever a file is added to a folder.

Just add the script as a Folder Action on a folder that you want monitored, and it'll pop up whenever something is added. If one file is added, the icon of that file pops up in the Growl notification; if more than one are added, then that folder's icon is displayed.

[robg adds: I haven't tested this one.]
    •    
  • Currently 2.25 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[14,541 views]  

A script to provide Growl notices on folder modification | 9 comments | Create New Account
Click here to return to the 'A script to provide Growl notices on folder modification' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to provide Growl notices on folder modification
Authored by: tinpan on May 18, '06 08:23:34AM

Cool. I'm going to mod this so it emails a user when their drop box on the OS X server is modified.

BTW: Does anyone know how to get notified if anything at any level under a folder is modified? When I've tried to watch folders I only get a "hit" if the contents are modified at the first level and no "hit" if sub-folders' contents are modified. These folders can contain thousands of sub-folders, so a watching each sub-folder and automatically generating and updating those watches slows computers to a crawl. Launchd is no better and 10.4 only. I considered using fs_usage, but that's also 10.4 only and I need a solution for 10.4 and 10.3. Any ideas?



[ Reply to This | # ]
Theres a script rather like this already distributed with Growl
Authored by: Diggory on May 18, '06 08:46:54AM

Did you look in the Scripts folder in the Growl DMG?

There is an example script that does the same thing in there.

---
*****
monkeyfood software - http://www.monkeyfood.com



[ Reply to This | # ]
A script to provide Growl notices on folder modification
Authored by: lolajl on May 18, '06 10:38:28AM

I'm having problems with the script . . . first I had to delete the strange characters at the end of some of these lines - the upper case A with some accent mark, and then I goet an error message about the line ending. Has the script been corrupted during uploading?



[ Reply to This | # ]
A script to provide Growl notices on folder modification
Authored by: jacobolus on May 18, '06 01:16:35PM
This is an encoding issue. The ¬ character ends up looking funny when you translate it between Unicode, Mac Roman, and ISO Latin 1 character encodings. Just replace the funny pair of letters with a single ¬, and you should be fine.

[ Reply to This | # ]
A script to provide Growl notices on folder modification
Authored by: MacFox on May 18, '06 12:07:46PM

This is a good hint. Thanks for posting it.

I have a slightly different setup for this type of notification using Automator that applies a Folder Action to the iDisk Public folder. I have two workflows. The first changes the color label on my Public folder, a desktop alias, and any items that are added to it to red whenever a change occurs.

My second Automator workflow is not a Folder Action but both a Finder plug-in and application that changes the label of the Public folder, it's alias, and all it's contents to green. I've customized the toolbar on my Finder windows to include the application so that I can just click on it directly.

The result is that whenever new items are added to the iDisk Public folder those items as well as the Public folder are labelled red to indicate that I should take a look. The labels on any existing items in the folder aren't changed so I can easily distinguish between new and old items. Once I have reviewed the items I run the second workflow, either from the Finder pop up menus or from the toolbar, and this turns everything green to indicate that I have seen these items.

I have also added Growl notifications to these workflows within Automator to pop up on my second monitor.



[ Reply to This | # ]
A script to provide Growl notices on folder modification
Authored by: mtimmsj on May 18, '06 12:36:28PM

Just an FYI to possibly avoid some frustration for others. Folder Actions don't work on folders that are protected by filevault. This is a long standing limitation with filevault that - AFAIK - Apple hasn't seen fit to address.



[ Reply to This | # ]
A script to provide Growl notices on folder modification
Authored by: jacobolus on May 18, '06 01:19:00PM
Rob, is there any way you can get the server to tell browsers to use Mac Roman encoding on that text file, so people don't get their "¬" characters messed up?

[ Reply to This | # ]
A script to provide Growl notices on folder modification
Authored by: zane on May 18, '06 03:21:39PM

If you option-click to download the .txt, then you're all good. But indeed, enforcing Mac Roman encoding would be advantageous for those sans-option clicks.



[ Reply to This | # ]
A script to provide Growl notices on folder modification
Authored by: adinb on Jul 19, '07 01:33:04AM

anyone know how to trigger a notice if the *permissions* on a folder get changed?

I'm tracking down which process is leaving ./Applications with a 0 uuid and guid; so I'm trying to script at a level that I don't think folder actions provides.

Any ideas?



[ Reply to This | # ]