List all files in a specific folder (and subfolders)- even those owned by non-domain users

418 views
Skip to first unread message

Jim Garrison

unread,
Mar 22, 2023, 7:50:18 PM3/22/23
to GAM for Google Workspace
I am a domain admin.  Before my time, someone in my organization decided to set up a central file store using a domain account's "My Drive".  Over time, other admins granted Content Manager privileges to quite a few non-domain accounts (some...@gmail.com), and those users have created a significant number of files.

We are moving all those files to a "Shared Drive" (aka Team Drive), and I would like to get a complete list of those files via the GAMADV tool. I can list all files with

gam all users show filelist allfields filepath

But, this lists only files owned by domain users.  I can't find a way to list all files given a starting path, regardless of who owns the files.  In my case the top-level folder is in a "My Drive" owned by admi...@mydomain.org.

Is this even possible, and if so, how?

Robert Fine

unread,
Mar 23, 2023, 5:09:30 AM3/23/23
to GAM for Google Workspace
Hi Jim, 

it would probably be something like this.
gam user <User Mail> print filelist showownedby others fields id,name,owners.emailaddress,webviewlink excludetrashed todrive

you can try to refine the syntax by looking at The print filelist options on https://sites.google.com/jis.edu.bn/gam-commands/services/drive#h.p_vVy02_7YC56S

Jim Garrison

unread,
Mar 23, 2023, 1:57:30 PM3/23/23
to GAM for Google Workspace
On Thursday, March 23, 2023 at 2:09:30 AM UTC-7 Robert Fine wrote:
Hi Jim, 

it would probably be something like this.
gam user <User Mail> print filelist showownedby others fields id,name,owners.emailaddress,webviewlink excludetrashed todrive

you can try to refine the syntax by looking at The print filelist options on https://sites.google.com/jis.edu.bn/gam-commands/services/drive#h.p_vVy02_7YC56S

Thanks, I was able to come up with this, which seems to do exactly what I need:

gam user admi...@mydomain.org show filelist anyowner excludetrashed allfields filepath todrive 

Reply all
Reply to author
Forward
0 new messages