Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

grimreaper1377

macrumors regular
Original poster
Oct 20, 2007
218
0
Hi all,

I was wondering how something like Dropbox could be made. I know it was done in Python, but is it possible to modify folders like that, where you can drag-and-drop files into them so they'll be uploaded automatically?

Thanks.
 

HiRez

macrumors 603
Jan 6, 2004
6,265
2,630
Western US
Are you looking for an application to write? Because if not, OS X's built in Folder Actions combined with Automator or AppleScript are probably the easiest way to do that. Unfortunately in Leopard, Folder Actions are pretty flakey and not 100% reliable (sometimes not at all reliable), although some people have had success with them.

I imagine you could write an app in just about any language that will watch a folder for changes and do something when it finds new files in there, although the methods used for checking the folder may not be that efficient (polling), and you'd probably want something running as a faceless background application or daemon. You could also maybe attach something to a cron job that checks periodically, but again that may not be terribly efficient.

OS X's launchd services has a nifty feature that will launch one of your scripts when it detects a file system change. Unfortunately, they forgot to provide any mechanism for the called script to find out what part of the file system actually changed, making it almost useless unless you want your script called every time a file or folder is created, moved, renamed, deleted, modified.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
Don't bump things.

Chances are Applescript is not involved, since they have clients for OS X, Linux, and Windows. The OS X version could use applescript, but that would mean it's totally different than the other two platforms. I emailed feedback@getdropbox.com. If they respond, i'll post the response here.

-Lee
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
I got a response from the dropbox folks, this was it:
To quote our CTO, Dropbox is made possibly(sic) via "Python and pylons/twisted + secret dropbox sauce ;)"

It sounds like python it is.

-Lee
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.