download file directly to google drive code example
Example 1: command line download file from google drive
$ wget "https://drive.google.com/uc?export=download&id=<fileId>" -O <fileName>
Example 2: 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);
}