Empty Drive Trash for Shared Drive

1,050 views
Skip to first unread message

Victor Luis

unread,
Sep 22, 2021, 10:54:40 AM9/22/21
to GAM for Google Workspace
Hello everyone.

I searched, but I couldn't find it on the GAM Advanced page.

What command can I use to erase all files from a shared drive?

I know it exists for users via GAM Standard and for Shared Drive you must use GAM Advanced. But I didn't find it.

Can you help me?

Regards.

Ross Scroggs

unread,
Sep 22, 2021, 11:14:03 AM9/22/21
to google-ap...@googlegroups.com
Victor,

You'll need an organizer of the the Shared Drive and the Shared Drive ID,

gam redirect csv ./SharedDriveFiles.csv user orga...@domain.com print filelist select teamdriveid <SharedDriveID> fields id,name

gam redirect stdout ./SharedDriveCleanup.txt multiprocess redirect stderr stdout csv ./SharedDriveFiles.csv gam user "~Owner" purge drivefile "~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/50e3c009-12ad-4903-b668-ebe3411fb769n%40googlegroups.com.


--

Victor Luis

unread,
Sep 22, 2021, 1:06:00 PM9/22/21
to google-ap...@googlegroups.com
Hi Ross

And in this case, how can I delete files from only the trash of shared drive?

Regards.



--
 

Victor Luis De Souza

Analista de Suporte GWS

 

Ross Scroggs

unread,
Sep 22, 2021, 1:29:44 PM9/22/21
to google-ap...@googlegroups.com
Victor,

If what you want to do is empty the shared drive trash do this:
gam user orga...@domain.com empty drivetrash teamdriveid <SharedDriveID>

Ross



--

Victor Luis

unread,
Sep 23, 2021, 10:25:26 AM9/23/21
to google-ap...@googlegroups.com
Hello, Ross.

It worked, thank you very much.

Regards.

Reply all
Reply to author
Forward
0 new messages