File Ownership in specific folder/sub folders in MyDrive

113 views
Skip to first unread message

David Amos

unread,
May 16, 2022, 7:15:31 AM5/16/22
to GAM for Google Workspace
Hi

I want to run a list of files and their owners to a sheet/CSV, however I want to run it on a folder in My Drive and the sub folders (long story short, previous admin setup a Shared Drive in their My Drive and shared it, it is a mess).

I know I can run "gam config auto_batch_min 1 multiprocessexit rc=0 redirect csv - multiprocess redirect stderr null multiprocess all users print filelist select id <DriveFileID> fields id,name,owners.emailaddress norecursion showownedby any"

However the owners are both out Workspace users, and those in our other brands workspaces, which at present are separate (we want to tidy this drive issue up first, then we are migrating the agencies one by one)

Any help greatly appreciated.

Kind Regards

Dave

Ross Scroggs

unread,
May 16, 2022, 9:49:35 AM5/16/22
to google-ap...@googlegroups.com
David,

Run this command substituting the actual address for ad...@domain.com

gam redirect csv ./AddminFolderFiles.csv user ad...@domain.com print filelist select id <DriveFileID> fields id,name,owners.emailaddress recursion showownedby any

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/8a631f12-6cec-4fa2-b665-36026b69534en%40googlegroups.com.

David Amos

unread,
May 16, 2022, 10:09:30 AM5/16/22
to GAM for Google Workspace
Hi Ross

Hope you are well, and thanks for the response, which ID needs to go in  <DriveFileID>

If I put in the ID for the parent folder, I get the following error back when I run the command (with my admin account, that owns the top level folder in My Drive\Shared Drive\<Parent Folder to Scan>


TF_GAM_Error_001.jpg

Kind Regards

Dave

Ross Scroggs

unread,
May 16, 2022, 10:27:27 AM5/16/22
to google-ap...@googlegroups.com
Dave,

My mistake, drop recursion from the command, it is the default.

Ros

On May 16, 2022, at 7:09 AM, David Amos <david...@shoppermediagroup.com> wrote:

Hi Ross

Hope you are well, and thanks for the response, which ID needs to go in  <DriveFileID>

If I put in the ID for the parent folder, I get the following error back when I run the command (with my admin account, that owns the top level folder in My Drive\Shared Drive\<Parent Folder to Scan>


Reply all
Reply to author
Forward
0 new messages