Get ID of all content in a folder

246 views
Skip to first unread message

Dan Thomas@vcu

unread,
Jul 23, 2021, 2:14:04 PM7/23/21
to GAM for Google Workspace
Hi,

I am trying to find a way to print a list( a sheet or csv) with at least the item ID, Name, and Owner. The file size would be great but is just a wish. I know the ID of this folder and the aprocument size is close to a terabyte, otherwise I would have opted to download and upload. 

Short history, we are moving students from a standalone domain to the faculty/staff standalone domain. We have a few large folders of data to move that have content from multiple users in both domains. Before we work on how to move it I need to identify what we are moving and who the owner is.


Brian Kim

unread,
Jul 24, 2021, 10:06:09 AM7/24/21
to GAM for Google Workspace
Try
gam redirect csv ./files.csv multiprocess user user...@domain.com print filelist select <folderID> anyowner fields id,title,size,owners.emailaddress

Mario J D'Avirro

unread,
Dec 5, 2021, 12:40:50 PM12/5/21
to GAM for Google Workspace

I get the following error

"ERROR: redirect is not a valid argument for "gam" "

I am using version 6.11.

If I try without the redirect using...
inputing: gam user myusername  print filelist select FolderID  anyowner fields id,title,size,owners.emailaddress

results in: "ERROR: select is not a valie argument for "gam (users) show filelist"


All I want to do is get the FileID for a folder given the name and the parentID.


***************************************** Important Notice ***************************************************

This message w/attachments ("Message") is intended solely for the use of the intended recipient(s) and may contain information that is privileged, confidential or proprietary. If you are not an intended recipient, please notify the sender, and then please delete and destroy all copies and attachments, and be advised that any review or dissemination of, or the taking of any action in reliance on, the information contained in or attached to this Message is prohibited. Unless specifically indicated, this Message is not a promise, confirmation, agreement, or representation of any insurance coverage, nor is this Message is an offer to sell or a solicitation of any investment products or other financial product or service, or an official confirmation of any transaction, or an official statement of Sender. Subject to applicable law, Sender may intercept, monitor, review and retain e-communications ("EC") traveling through its networks/systems and may produce any such EC to regulators, law enforcement, in litigation and as required by law. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This Message cannot be guaranteed to be secure or free of errors or viruses.

Ce message est à l'usage exclusif de son destinataire et peut contenir des renseignements confidentiels. Ne le transmettez à personne, de quelque façon que ce soit, sans l'autorisation de son expéditeur. Si vous avez reçu ce message par erreur, communiquez immédiatement avec l’expéditeur et supprimez le message ainsi que toutes pièces jointes de votre ordinateur.  Sauf indication contraire, ce message n'est pas une promesse, une confirmation, un accord ou une représentation de couverture d'assurance, et ce message n'est pas non plus une offre de vente ou une sollicitation de tout produit de placement ou autre produit ou service financier ou une confirmation officielle de transaction ou un relevé officiel de l'expéditeur.

*****************************************************************************************************************

Ross Scroggs

unread,
Dec 5, 2021, 1:35:56 PM12/5/21
to google-ap...@googlegroups.com
Mario,

redirect in available in Advanced GAM; you have Standard GAM.

--
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/003e8279-6dd3-4474-8b9f-92ae0b99ad5an%40googlegroups.com.

Ross Scroggs

unread,
Dec 5, 2021, 3:28:35 PM12/5/21
to google-ap...@googlegroups.com
Mario,

Standard GAM:

gam user us...@domain.com print filelist query "'Parent Folder ID' in parents and title = 'Folder Name'" id


Ross


--
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/003e8279-6dd3-4474-8b9f-92ae0b99ad5an%40googlegroups.com.


--

MrBanada

unread,
Dec 5, 2021, 3:45:44 PM12/5/21
to GAM for Google Workspace

That did it - THANK YOU!

James SEYMOUR

unread,
Dec 6, 2021, 3:48:04 AM12/6/21
to GAM for Google Workspace
Hi MrBanada,

Not sure if this is possible with Standard GAM, but in GAMADV-XTD3 there is an option for excludetrashed.

So the command that Brian Kim gave will include files in the Bin. If you don't want to include these in the results, add excludetrashed (I also always add todrive as I want the results in a Google Sheet).

gam redirect csv ./files.csv multiprocess user user...@domain.com print filelist select <folderID> anyowner fields id,title,size,owners.emailaddress excludetrashed

Cheers

James
Reply all
Reply to author
Forward
0 new messages