Suppose you have a file in Google Drive named:
assets-cdn.github.com/images/modules/logos_page/Octocat.png
$ gdrive download 0BxsqC-<redacted>
Downloading assets-cdn.github.com/images/modules/logos_page/Octocat.png -> assets-cdn.github.com/images/modules/logos_page/Octocat.png
Downloaded 0BxsqC-<redacted> at 35.4 KB/s, total 35.4 KB
$ tree
└── assets-cdn.github.com
└── images
└── modules
└── logos_page
└── Octocat.png
This behavior is suboptimal. Perhaps replace the forward slashes with underscores or another token to preserve as closely as possible the filename in Google Drive?
n.b. this is also problem with gdrive export ... but instead gdrive will fail after attempting to write the file to the erroneous path.
$ gdrive export --force --mime "application/vnd.openxmlformats-officedocument.wordprocessingml.document" 1ZdRRv<redacted>
Unable to create new file 'test / file/ with / bad/name.docx': open test / file/ with / bad/name.docx: no such file or directory
this is the case with all the windows reserved characters:
< (less than)
> (greater than)
: (colon)
" (double quote)
/ (forward slash)
\ (backslash)
| (vertical bar or pipe)
? (question mark)
* (asterisk)
Most helpful comment
n.b. this is also problem with
gdrive export ...but instead gdrive will fail after attempting to write the file to the erroneous path.