I am using an automation tool which automatically reads new GMail and files the attachments on my Google drive in folders. How do I use the GDrive command to list the files in the folder?
You need to get the ID of the folder this can be done with the list command. If there are a lot of object you will need to use the query option to narrow it down. If you want a list of objects in the root you can use 'root' as the ID e.g.,
./gdrive list --query " 'root' in parents"
or
./gdrive list --query " 'IdOfTheParentFolder' in parents"
I also need this.
I must be a complete dumbass
parent_folder (parent_id)
鈹斺攢child_folder (child_id)
So if I want to get the content of the child_folder, is the command:
gdrive list --query "child_id"`
?
i tried both
gdrive list --query "child_id"`
and
gdrive list --query "parent_id"`
Getting error 400 on both
@taewookim Are you using the folder name for the parent_id, or are you using the actual ID hash? Also, you need to include the "in parents" part in your query. For example:
./gdrive list --query " 'child_id' in parents"
Most helpful comment
You need to get the ID of the folder this can be done with the list command. If there are a lot of object you will need to use the query option to narrow it down. If you want a list of objects in the root you can use 'root' as the ID e.g.,
./gdrive list --query " 'root' in parents"
or
./gdrive list --query " 'IdOfTheParentFolder' in parents"