BASH Version

(works on Linux, MacOS X, and a Cygwin bash on Windows)

A friend once emailed me a link to his public photo gallery, and I found it annoying that there was no easy way to bulk-download all the photos, so I wrote this small bash script.

  1. Download it from http://dl.dropbox.com/u/340607/download_dropbox_gallery.sh
  2. Make it executable (chmod +x download_dropbox_gallery.sh)
  3. Copy it to somewhere in your $PATH (or in the instructions below, just type the full path to download_dropbox_gallery.sh instead)
  4. Call it (from the command line / terminal) with the URL of the gallery and a (pre-existing) destination directory e.g.
    download_dropbox_gallery.sh "http://www.dropbox.com/gallery/3858123/1/XXXXX?h=74bc436" my_photos
  5. I couldn’t run the script with Cygwin under Windows, and found that wget fails while checking the SSL certificate. If you face the same problem (script will just tell you “Couldn’t download the gallery index page”), just add a parameter to each wget call in the script:
    "$WGET" --no-check-certificate ...
  6. If you want you can also choose to download the photos in a different size (choose from thumbnail, large, extralarge or original – original is the default) with an optional 3rd argument e.g.
    download_dropbox_gallery.sh "http://www.dropbox.com/gallery/3858123/1/XXXXX?h=74bc436" my_large_photos large
  7. It error-checks the arguments you give it, and then downloads all the photos from the gallery into the directory you gave it, printing out a progress display as it runs.

Bugfix 2010-07-10 – I fixed the quoting so it still works if the gallery URL or destination directory contain spaces

Bugfix 2011-10-27 – Updated to cope with modified URL encoding used by Dropbox galleries

Bugfix 2011-12-01 – Updated to work correctly on MacOS X

Bugfix 2012-01-24 – Tell the user if we detect any sub-galleries

PHP Version

Above bash script rewritten to PHP.

  1. Download it from http://dl.dropbox.com/u/14267359/scripts/download_dropbox_gallery.php
  2. Call it from command line with the URL of the gallery and a (pre-existing) destination directory e.g.
php download_dropbox_gallery.php "http://www.dropbox.com/gallery/3858123/1/XXXXX?h=74bc436" photos

If you want you can also choose to download the photos in a different size (choose from thumbnail, large, extralarge or original) e.g.

php download_dropbox_gallery.php "http://www.dropbox.com/gallery/3858123/1/XXXXX?h=74bc436" photos large

Improvements to original version:

  • downloading of image is skipped if destination directory already contains the image

Perl Version

Above PHP script rewritten in Perl (implemented using LWP::Simple).

  1. Download it from http://dl.dropbox.com/u/49991/download_dropbox_gallery.pl
  2. Call it from command line with the URL of the gallery and a (pre-existing) destination directory e.g.
perl download_dropbox_gallery.pl "http://www.dropbox.com/gallery/3858123/1/XXXXX?h=74bc436" .

If you want you can also choose to download the photos in a different size (choose from thumbnail, large, extralarge or original) e.g.

php download_dropbox_gallery.php "http://www.dropbox.com/gallery/3858123/1/XXXXX?h=74bc436" . large

Improvements to PHP version:

  • regular expressions adapted to support both single and double quotes (to match ‘original’ tags in the Dropbox gallery page)

Windows Application

Current version: 1.5.0 (last updated 7 January 2014)
Tested OSes: Windows XP and 7
Known issues: Windows 8.1
Dependencies: .NET Framework 3.5+ for v.1.5.x, .NET Framework 2.0+ for v.1.4.x or lower

A Windows application to download Dropbox galleries, written by Joshua White.

  1. Download the latest version of Dropbox Gallery Downloader from http://dl.dropbox.com/u/23174769/Software/Dropbox%20Gallery%20Downloader.exe
  2. Run program and enter the URL of the gallery in the “Web Address” box.
  3. Click on the “Gallery Folder” box to select a download destination directory (if you do not select a directory, then the gallery will be downloaded to the folder containing the application).
  4. Select image size – either scaled (a number of options are provided in the dropdown) or the original image size.
  5. Choose from the optional settings: file overwrite, subgallery download and include video files.
  6. Click “Download”. The main text box will show the progress of the download.

Changelog:

The complete changelog is available from here.

V1.4.2 Updates (7 June 2013)

  • Minor Bugfix

v1.5.0 Updates (7 January 2014):

  • Fix for change in Dropbox format (often half the files weren’t downloaded)
  • Minor GUI improvements
  • Added additional scaled image sizes
  • .NET Framework 3.5+ now required

Known Bugs and Issues:

  • If your gallery folder only contains subfolders and non-image files, the non-image files will fail and folders with these names will be created.
  • The change in style means that files that are not images or videos are not yet supported in v1.5.x
  • Google Chrome mistakenly identifies this as malicious. Google seems to be mistakenly identifying any unsigned or unknown EXEs as malicious.

Please send all feedback, questions, suggestions and comments to the developer: [email protected]

Share the Knowledge!

Helpful(0) Unhelpful(0)