How to get a recursive list of files and folders within a specific Shared Drive

111 views
Skip to first unread message

Riccardo Pereira

unread,
Jan 24, 2025, 10:58:46 AM1/24/25
to google-ap...@googlegroups.com
Hi there,

Is it possible to get a recursive list of files and folders(including their size) of a specific folder in a Shared Drive.  Is it also possible to get the same from My Drive folder? 



Kind regards



Riccardo Pereira


IT Service Desk Senior Technician

FT Technology


Bracken House 1 Friday Street London EC4M 9BT

T +44 (0)20 7873 3148





This email was sent by a company owned by Financial Times Group Limited ("FT Group"), registered office at Bracken House, One Friday Street, London, EC4M 9BT. Registered in England and Wales with company number 879531. This e-mail may contain confidential information. If you are not the intended recipient, please notify the sender immediately, delete all copies and do not distribute it further.  It could also contain personal views which are not necessarily those of the FT Group.  We may monitor outgoing or incoming emails as permitted by law.

Ross Scroggs

unread,
Jan 24, 2025, 11:14:52 AM1/24/25
to google-ap...@googlegroups.com


The command is the same for a Shared Drive or My Drive folder
gam user us...@domain.com print filelist select <FolderID> fields id,name,mimetype,size filepath


The API doesn't return size infomation for folders, you can get that with:
gam user us...@domain.com print diskusage <FolderID> 


Ross
----
Ross Scroggs



--
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 visit https://groups.google.com/d/msgid/google-apps-manager/CAKSFsgyKhfQBPvEFKsSoeKG0Gm5-AU54i8GrSXCocZ8%3DYdtCYQ%40mail.gmail.com.

Riccardo Pereira

unread,
Feb 12, 2025, 10:34:23 AM2/12/25
to google-ap...@googlegroups.com
Hi Ross,

Apologies for the delayed response.  I just wanted to say many thanks - both CMDs were very helpful;

gam user us...@domain.com print filelist select <FolderID> fields id,name,mimetype,size filepath

gam user us...@domain.com print diskusage <FolderID> 
Reply all
Reply to author
Forward
0 new messages