Print all files in a shared drive via GAM

2,598 views
Skip to first unread message

Ancymon Shaji

unread,
Apr 11, 2021, 12:59:46 PM4/11/21
to GAM for Google Workspace
Hi All,

Could you please help how to print all files in a shared drive. I tried many ways but getting errors.

Thanks in Advance.

Ancymon

Maj Marshall Giguere

unread,
Apr 11, 2021, 1:51:31 PM4/11/21
to google-ap...@googlegroups.com
> gam user <some user with permissions or admin> print filelist select teamdrive "shared drive name" fields id,title,mimetype

Maj Marshall E. Giguere, CAP
NH Wing Director of IT
U.S. Air Force Auxiliary
 


--
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/15044b46-059e-4231-a07a-e7666ea598d4n%40googlegroups.com.

Nicolás Cabello

unread,
Apr 12, 2021, 6:05:47 PM4/12/21
to GAM for Google Workspace

Hi Marsh, i  benn trying to print files in a shared folder to no avail, when i try the command this is what a i get

ERROR: select is not a valid argument for "gam <users> show filelist"

Ross Scroggs

unread,
Apr 12, 2021, 6:10:50 PM4/12/21
to google-ap...@googlegroups.com
Nicolas,

The command Marsh gave requires Advanced GAM (https://github.com/taers232c/GAMADV-XTD3)

Ross



--

Maj Marshall Giguere

unread,
Apr 12, 2021, 8:52:51 PM4/12/21
to google-ap...@googlegroups.com
As Ross points out you need to use Advanced GAM.  After that IIRC it's a two step process.  First you'll need the ID of the folder of interest, then you can pull the file list.  So, I think something like this:

> gam user <someUser> show fileinfo teamdrive "<team drive name>" teamdrivefilename "< folder name >" fields id,title

That will get you the ID of the folder, then you can ask for a list of files in the folder.

> gam user <someUser> print filelist select <folderID from previous step> fields owner,id.title

That should get you a list of all the files in the folder.  It's a non-obvious process and Ross may have a much slicker way to do it.


Maj Marshall E. Giguere, CAP
NH Wing Director of IT
U.S. Air Force Auxiliary
 

Reply all
Reply to author
Forward
0 new messages