I am on linux.
There is command line tool called "gdrive" that can handle google drive upload and download. It's github address is https://github.com/prasmussen/gdrive . But I got problem calling this program inside mathematica.
As the gdrive tutorial say, a first run of gdrive, you will meet this prompt
after verification, you don't need to verify it anymore, and in terminal
gdrive list
will show files on my google drive
admin@Precision:~/wc/gdrive$ ./gdrive list
Id Name
Type Size Created 1nyfgXauEC6JX1qeAMGtO85e_tIepx_Fg
39d465076ed1bdeaf4f...aab359f92a7c1c4.gz bin 12.8 MB 2018-11-07 14:53:53
Then I tried inside mathematica
SetDirectory["/home/admin/wc/gdrive"];
RunProcess[{"./gdrive", "list"}, "StandardOutput"]
it outputs
Failed to list files: Get \ https://www.googleapis.com/drive/v3/files?alt=json&fields=\ nextPageToken%2Cfiles%28id%2Cname%2Cmd5Checksum%2CmimeType%2Csize%\ 2CcreatedTime%2Cparents%29&orderBy=&pageSize=30&q=trashed+%3D+false+\ and+%27me%27+in+owners: read tcp \ 172.16.24.201:35444->216.58.200.42:443: read: connection reset by peer
It just like the "gdrive" is not verified and being used for the first time!!! How to solve this issue?
PS. at the same time, python has no problem calling external gdrive
gdrive
before, but I just installed it using the homebrew invocation from the Github page, and what you described immediately worked for me from within Mathematica with:RunProcess[{"gdrive", "list"}, ProcessDirectory -> "/usr/local/bin/"]
(on macOS with M11.3) $\endgroup$ – ktm Nov 8 '18 at 1:48ProcessDirectory
to the output ofwhich gdrive
$\endgroup$ – ktm Nov 8 '18 at 1:50RunProcess[{"gdrive", "list"}, ProcessDirectory -> "/usr/local/bin/"]
listed the entirety of my Google Drive file directory. $\endgroup$ – ktm Nov 8 '18 at 16:29