Sunday 17 August 2008

Automate File Upload in Google Docs

Google Docs has an option to upload files from web addresses, but it's not very convenient if you want to load many documents or you want to add a link for uploading a document. Here's the direct link that can be used to open a document from the web in Google Docs:

http://docs.google.com/?action=updoc&formsubmitted=true&uploadURL=DOCUMENTURL

This works for documents (.doc/.txt/.html/.rtf/.odt), spreadsheets (.xls/.csv/.ods), presentations (.ppt) and PDF files.

In Windows, you can easily create a batch file that automates the upload of multiple files to Google Docs, assuming that the browser is open and you are already logged in to a Google Account. For example, the following text can be copied in Notepad and saved as a .bat file. After executing the .bat, the two PDF files will upload to Google Docs in separate Firefox tabs.

start /d "%PROGRAMFILES%\Mozilla Firefox" firefox "http://docs.google.com/?action=updoc&formsubmitted=true&uploadURL=http://www.fireworksafety.com/pdfs/FireworkSafetyTest.pdf"

start /d "%PROGRAMFILES%\Mozilla Firefox" firefox "http://docs.google.com/?action=updoc&formsubmitted=true&uploadURL=www.fs.fed.us/fire/safety/wct/2002/brochure_2002.pdf"

A similar option is available in Google Toolbar for Firefox, which lets you open documents from the web in Google Docs.

No comments:

Post a Comment