drive
drive copied to clipboard
How can I get uploaded google drive id?
Hi,
When I upload one file, command
drive push -no-prompt /path/to/file
when it done, how can I get drive id of this file?
Thanks,
Hello @quydox, thank you for the question and welcome to drive!
So the command to list is drive id <path>
and it is documented in the README file at https://github.com/odeke-em/drive#retrieving-fileid
Thanks for your reply. It is okay :D
@odeke-em Hi, I want to ask another question here, please help me
I want to push /path/to/local.mp4 in local to remote is path/to/new_file_name.mp4
drive push -no-prompt -files o/new_file_name.mp4 /path/to/local.mp4
But it create folder o/new_file_name.mp4 then push file local.mp4 inside
Unfortunately that option isn't directly there because we mostly want the names to mirror each other for synchronization. However, here is a hack to accomplish it
cat /path/to/local.mp4 | drive push -piped path/to/new_file_name.mp4
Unfortunately I currently don't have time and bandwidth, but otherwise it would be nice to have an option with a name change.
Hope this helps and thank you!