Monday, February 1, 2010

Google Docs Bulk Upload on OS X (Mac)

Google Docs has proven to be a superb productivity platform for small businesses and individuals because of its gratis status. What dampens the excitement is that it is a web application, not a local application. This necessitates uploading files there before you work with them.

That in and of itself is not difficult. What is difficult is the preservation of the folder structure so as to keep the transition very easy. I've found success in using the Google Docs Batch Upload utility. The whole thing is written in Java, which comes in really handy since the same utility can be used on Win, OSX or Nix.

The easiest way to go about it is to install it via wget. A graphical installer for wget can be found here. After installing wget, you'll need a terminal window. Open spotlight and enter "Terminal" or open Applications/Utilities. Enter the following command but note that the version number may have changed. -1.3.1.jar could be updated to a newer number. Check the above link for that version number. Version current as of this writing.

wget http://google-docs-upload.googlecode.com/files/google-docs-upload-1.3.1.jar
That command will download the utility to your computer. Next comes the actual execution of that.
java -jar google-docs-upload-1.3.1.jar ~/Documents/ --recursive --username name@gmail.com
After enter your password (the letters/numbers won't show up, just keep typing), the above command will (assuming default terminal settings) upload everything contained in your "Documents" folder to Google Docs. You don't need to fret about sorting through it, since it will only upload compatible file types. Should there be any problems (duplicate files, etc) the copy will pause and you'll be asked to punch in an answer. Other than that, it runs swimmingly.

EDIT: This requires Java 6. Your Mac almost certainly has it, but requires you to prioritize it. Open 'Java Preferences' in Applications/Utilities. Now drag Java SE 6 to the top of the 'Java Applications' window that is on the lower half of the window. This will solve the applet not working for some.

No comments:

Post a Comment