Patrick Truchon's Web Portal

Dropbox Webfolder

Posted by Patrick on March 25, 2010

Public Web Folder

A few years ago, I started working at a one-to-one laptop school where every student has their own MacBook and classrooms are equipped with iMacs, projectors, sound systems, etc.  Our server also hosts our Moodle [1] site,  and provides us all with some server space to set up individual websites.

One of the tasks I wanted to accomplish (often, quickly, and easily) was to share files with my students.  The obvious (and most annoying) method of delivery was to email everyone.  Another possibility was to upload the files on Moodle and use my course pages to organize these resources.  I found both these methods, however, too time consuming.  Finally, I decided to use my little corner of the school server to set up a Web Folder [2] where I only had to drag and drop files.  To allow the public to browse these files, I wrote a Bash script that creates index.html files to list content.  I’ve been finding this method very convenient, but always kept wondering how it could be adapted for people without access to a server.  Then, came Dropbox. [3]

File synchronization

Dropbox is an online tool that allows users to sync a folder online and across multiple computers automatically.  If you are regularly using different computers, this can be an excellent productivity tool.  I keep all my work files in the Dropbox folder on my three computers.  That way, it doesn’t matter if I’m at school or home, my work is always there and up-to-date.  This also provides me with the added safety of backing up my work: it’s on three computers + the Dropbox server.

The Public Folder

Dropbox also provide a few extra goodies, one of which is a public folder.  To share big files with others:

  • simply put them in your Dropbox/Public folder
  • right click on the file and select “Dropbox” -> “Copy Public Link”
  • email this to a friend.

Exploiting this feature, I adapted my Bash script (for GNU/Linux and OS X) so that others can easily use it.

First Time Setup:

  • Create a Dropbox account here [3], and set it up on at least one computer.
  • Create a folder named WebFolder in your Dropbox/Public folder
  • Create a folder named webpix in your WebFolder
  • Download the icons from here [4] and put them in your webpix folder
  • Download index_redirect_javascript.html from here [5],
    • rename it index.html
    • edit it with your own website address (if you have one)
    • place it in your Dropbox/Public folder (just outside your WebFolder)

    This index.html file is used to send people back to your main website when they reach the root of your Dropbox/Public folder.  It is not necessary.

  • Copy your Dropbox Internet address by right clicking on the index.html file in your Dropbox/Public folder by selecting “Dropbox” -> “Copy Public Link” (you’ll need this for the next step)
  • Download from here [5] onto your Desktop and edit the first few lines.  In particular, paste your Public Link into the $ADDRESS section, making sure to replace the “index.html” part by “WebFolder”.  You’ll see my information as an example.
  • Make the file executable: Open a terminal and type:
    sudo chmod 755 ~/Desktop/
  • Ready!

To use it:

  • Simply put files and folders you want to share in your WebFolder
  • Open with a Terminal (it should ask you for your password)
  • Wait a moment for Dropbox to synchronize the files with its server.
  • Done!

The Result:

  • The public at large will be able to browse your WebFolder
  • But it won’t be able to browse files in your Public folder that are outside your WebFolder (unless they know the name of the files)


  1. Moodle, <>
  2. Patrick Truchon’s HIS WebFolder, <>
  3. Dropbox, <>
  4. Patrick Truchon’s Personal WebFolder icons, <>
  5. Patrick Truchon’s Personal WebFolder Bash Scripts, <>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: