I have to find the id of a folder in a user Drive. Is there any way to do it by GAM?
if you know the email address of a user who should have access to the folder
you can do gam user username show fileinfo name <name of the folder>There could be multiple folders of the same name. Alternatively you could also search in Drive audit log.
You can also use a query if you don’t know the exact name.
Exact: gam user <user email address> print filelist query "title = '<File Name>'"
Part of file name: gam user <user email address> print filelist query "title contains '<Part of File Name>'" todrive tdtitle "<Results File Name>"
In case the file is owned by someone else: gam user <user email address> print filelist query "title contains '<Part of File Name>'" anyowner
This site is a great resource for frequently needed gam commands: https://sites.google.com/jis.edu.bn/gam-commands/services/drive#h.p_KSW-iOhp7F6A
Already have an account? Login
No account yet? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.