全文引自:http://jdev.tw/blog/4658/dropbox-googledrive-cli
GoogleDrive上傳/下載命令行工具:gdrive
- 官方網站:https://github.com/prasmussen/gdrive
- 下載網址Windows x64:https://drive.google.com/uc?id=0B3X9GlR6EmbnZ3gyeGw4d3ozbUk
- 下載網址Windows x86:https://drive.google.com/uc?id=0B3X9GlR6EmbnTXlSc1FqV1dvSTQ
- 尚有Linux與OS/X版本,請自行到其官網下載
- 命令格式:drive-windows-x64.exe 操作 選項
- 操作記錄:gdrive的上傳或下載都要指定檔案ID,因此必須先用list找到ID,再用
-i 檔案ID
來操作特定檔案
範例1. 列出檔案以取得檔案ID:
d:DL>drive-windows-x64.exe list -t ditto*.exe Id Title Size Created 0B_dE90dinOFDcFE0aEFvWktvM1E Ditto.exe 1.9 MB 2014-06-09 20: 19:47 0B_dE90dinOFDTU1ucFF4bE9yQnc DittoSetup_64bit_3_18_46_0.exe 3.6 MB 2014-06-09 12: 08:50
範例2. 下載檔案
d:DL>drive-windows-x64 download -i 0B_dE90dinOFDcFE0aEFvWktvM1E Downloaded 'Ditto.exe' at 1.9 MB/s, total 1.9 MB
範例3. 取得檔案的網址
d:DL>drive-windows-x64 url -i 0B_dE90dinOFDcFE0aEFvWktvM1E https://drive.google.com/uc?id=0B_dE90dinOFDcFE0aEFvWktvM1E
請參考官方上的更多範例。