How to Create a Dropbox / Monitored Folder for Usenet on Mac
Earlier this week, Panic released a new version of my favorite Usenet client for Mac, Unison. With additions such as automatic PAR and UNRAR, smart PAR downloading, a built-in browser for NZB searching, and an interface overall, Unison quickly became the best Usenet client on Mac.
Unfortunately, I feel Unison skipped over one great feature that I’ve requested to them in the past: folder monitoring. Most torrent clients include this feature, and if you’re unfamiliar with the term, folder monitoring basically watches a set folder (usually your downloads folder) for .torrent or other files, automatically opens them, and usually sends the opened file to the trash. The same feature would work great with Usenet’s NZB files.
Creating an NZB Dropbox
Thankfully, Leopard and Snow Leopard include the functionality at the operating system level to make this a reality, which is exactly what I’ve done. I wrote a folder action script, a type of script that runs whenever a file is added, edited, or deleted in a folder. Folder actions are linked at the operating system level and require no additional software to run.
Here are the steps required to setup the dropbox folder action:
- Download my folder action script (version 1.1, see changelog) and unzip.
- Move the script to: [YourMacHardDrive]/Library/Scripts/Folder Action Scripts/
- Right click on the folder you wish to monitor, and select “Folder Actions Setup…” (this may be called something different under Leopard).
On the dialog box that comes up, select the “NZB Dropbox.scpt” option, and click Attach.- Close the Folder Actions Setup window.
After performing these steps, the folder action is ready, and dropping any .nzb in the folder will trigger the action. Here’s a rundown of what happens when a new file is added to the folder:
- Determines if the file is an NZB, if not, it ignores the file and moves on.
- Opens Unison in the background if not already open. If the folder action is triggered while you’re working on another application, you won’t even notice Unison open.
- Adds the NZB to the download queue in the background. Unison will remain hidden and not disrupt your workflow.
- After a successful import, deletes the NZB file processed.
Using the Script for Other Applications
If you open the script in the AppleScript Editor (an application found your Mac’s Utilities folder), with a little bit of programming knowledge you should have no problem migrating the script for Usenet clients other than Unison, other files and applications (like torrents if your torrent client of choice doesn’t support folder monitor), or even just tweaking the script to remove or add features like trashing the NZB.
Any suggestions are welcomed on improving this script. I’ve been running it successfully for the past few days and it’s been working great for me, but I’m sure there is more that can be done with it.
Dropbox Uses
I’d recommend setting this folder action up on your browser’s download folder, but there are certainly other uses outside of download folder monitor. Look for a new post in the next few days with an excellent use for the script (actually, the main reason why I wrote the script). Until then, feel free to share in the comments what you’re using the script for. Enjoy!
Script Changelog
1.1 (2010-01-20)
- Added check to ensure file is complete and not still downloading.
- Added check to verify Unison opened before attempting to add the NZB.
1.0 (2010-01-08)
- Initial release.

UsenetReviewz
Tuesday, January 12th, 2010 at 1:34 pm
Nice article — thanks for the writing that up .. I like your analytics plugin too although been having issues with asynch tracking in general recently
We added your link to our Unison review page: http://usenetreviewz.com/unison-review
Ronald Heft
Wednesday, January 13th, 2010 at 12:18 am
Glad to hear you enjoy the tutorial, and if you have issues with Google Analyticator, feel free to report them on the support forums.
MrT
Monday, January 18th, 2010 at 10:00 am
Been looking for something like this for a while! Cant wait to try thank you
Steve
Wednesday, January 20th, 2010 at 12:38 pm
I like this script a lot but I have experienced some difficulties if Unison is already downloading and I am attempting to add an nzb file remotely (over an internet mounted afp share).
I attempt to copy nzb(s) to the drop box from the remote computer and, due to the bandwith being bused by unison, the copy process is slow which causes an error to pop up in unison before the file is completely copied.
I didn’t think snow leopard still had a problem for “adding files” actions on folder scripts firing before the file was completely copied. Even so, I put in a delay but I still get errors on occasion.
Ronald Heft
Wednesday, January 20th, 2010 at 1:10 pm
Well, a delay is what I would have suggested, but since you’ve tried that already, I looked into the problem more.
Check out version 1.1. I added support for verifying the file is downloaded before running and also added an additional check on Unison before opening an NZB.
I was running into similar problems, so these updates are a benefit to me as well.
Arthur Sleep
Sunday, February 21st, 2010 at 8:23 am
I like it even though im a windows man myself but if you need any NZB,s join here http://www.nzb-forum.com hope to see you soon