Question

GAM question : Find a folder id

  • 19 August 2022
  • 2 replies
  • 40 views

Hello,

 

I have to find the id of a folder in a user Drive. Is there any way to do it by GAM? 

 

Many thanks


2 replies

Userlevel 3
Badge +1

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.

Userlevel 2
Badge +2

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

Reply