hack download all google drive files at once code example
Example 1: how download google drive file with wget
// Files smaller than 100MB
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O FILENAME
// Files bigger than 100MB
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt
Example 2: command line download file from google drive
$ wget "https://drive.google.com/uc?export=download&id=<fileId>" -O <fileName>
Example 3: download from google drive in terminal
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt
Example 4: google drive file download link using wget
curl -L "https://docs.google.com/uc?export=download&id=0Bz-w5tutuZIYY3h5YlMzTjhnbGM" > index4phlat.tar.gz
Example 5: script to download a file to google drive
function saveFile() {
var url = "http://www.ferc.gov/docs-filing/eqr/soft-tools/sample-csv/contract.txt";
var blob = UrlFetchApp.fetch(url).getBlob();
DriveApp.createFile(blob);
}