Have you ever wanted to be informed when someone puts something into your public drop-box? OS 9 used to allow you to attach apple scripts to a folder, and have them run when the contents changed. I don't think you can do that any more! So, here's a script which will email you when your drop-box contents changes.

Read the rest of the article for the script...

Firstly, you need to set the permissions on / so that sendmail will run. Do this by typing the following in the Terminal:

chmod g-w /chmod g-w /etc/chmod g-w /etc/mail/

Otherwise, sendmail complains about the permissions of the directory structures - it's a safety feature.

Ok, so now for the script. Basically we want to check the contents of the dropbox on a regular basis, so we have to record the 'last-known contents'. Type the following using your favorite editor, and put it somewhere safe (I use ~/bin, but see the note on security later)

Obviously, you will want to replace "username" with your own username or email. If you use a username ie. fred, then make sure you're fetching UNIX mail, or the whole thing won't work. See here for info on how to set up mail.app to recieve local UNIX mail.

Now all you have to do is set up a dummy, empty contents list, and install the cron job. The empty list is created with the following line

echo >~/.DropBoxList

and the cron job can be installed to run as often as you like. I'd suggest every 10-20 minutes, which is achieved by using */20 in the minutes column of crontab. A quick note on security: It's not a good idea to allow group-write access to files you run as a cron job, because otherwise someone can overwrite your script, and hey-presto they can run any command as you. For that reason, make sure you do the following on both the script and it's containing directory:

The second script has bad syntax. On line 7, the Editor reports an error. I tried my puny bit of AppleScript knowledge, but it still has me stumped. I do like the fact that classic is dead... I kept tapping my heals together and saying "I wish classic was dead (so on, and so forth)" but that didn't work. I named first script "Classic Raid" because it kills Classic on contact.

i think this represents the real beauty and power of unix. here's something that some poor team of developers slaved over for nine months to implement in OS9, that can be thoroughly replicated by a four line shell script in unix.

with a little knowledge, ingenuity and cleverness, the tools you can create in unix-land are infinitely beautiful and mind-boggingly simple.

it's a bizarre system, at first. but after you turn the corner, Oz! you realize what a good philosophy the designers had in mind.

but, don't get me started talking about the inconsistencies in the man pages! #@%$^&*

I wrote the following script to alert me of any incoming items. It does this by speaking the number of items in your drop box (but only if there are any), and if there are items it will also open the Drop Box folder automatically. Obviously what it does when it finds items in your Drop Box can be changed to suit your preferences. I saved this as an application and used cron to schedule this to run once each afternoon.

You will need to change "YOUR-USER-NAME" to your actual user name, and "VOLUME" to the drive your users folder is on.

[code]
tell application "Finder"
set myCount to (count every file of folder "Users:YOUR-USER-NAME:Public:Drop Box" of disk "VOLUME")
set myDialog to "You have " & myCount & " items in your drop box!"
try
if (myCount > 0) then
if (myCount = 1) then set myDialog to "You have one item in your drop box!"
say myDialog
open folder "Users:YOUR-USER-NAME:Public:Drop Box" of disk "VOLUME"
end if
end try
end tell
[/code]