Delete Drive Folder for all users

304 views
Skip to first unread message

edowning

unread,
Aug 27, 2018, 2:02:47 PM8/27/18
to GAM for G Suite
Hello we have been asked to create a folder entitled "Files From Box Migration" for all users. I have been able to create this folder for all users using GAM - thank you!

However now we have been asked to delete this folder. FANTASTIC

I am running the following query however it is resulting in an error. Could you take a look please and advise:


gam csv UsersForGAM.csv gam user ~em delete drivefile drivefilename "Files From Box Migration" mimetype application/vnd.google-apps.folder

ERROR
: Files From Box Migration is not a valid argument for "gam <users> delete drivefile"


I am hoping I don't have to now get the Drive folder ID for each user.

Thanks for any guidance.

Ross Scroggs

unread,
Aug 27, 2018, 2:11:05 PM8/27/18
to google-ap...@googlegroups.com
What does gam version display?

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/5efa5b08-7f80-4cf9-93ca-cbe8cad8a936%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Eric Downing

unread,
Aug 27, 2018, 2:12:25 PM8/27/18
to google-ap...@googlegroups.com
4.60


Eric Downing
| Sales Engineer

edow...@upcurvecloud.com

UpCurve Cloud
Office: (310) 400-5803 | Mobile: (786) 431-7918
www.upcurvecloud.com



You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/__r4GDCCvL8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.

Ross Scroggs

unread,
Aug 27, 2018, 2:27:19 PM8/27/18
to google-ap...@googlegroups.com
Eric,

In Gam 4.60, you have to have the file id; your command work as is (after dropping the unnecessary mime type argument) in my Advanced GAM (https://github.com/taers232c/GAMADV-XTD)

In Gam 4.60 you will do some this like this:

gam csv UsersForGam.csv gam user ~em print filelist query "title='Files From Box Migration'" id title > FilesToDelete.csv


Edit FilesToDelete.csv and delete all header rows (Owner,id,title) except the first


gam csv FilesToDelete.csv gam user ~Owner delete drivefile ~id


Ross



For more options, visit https://groups.google.com/d/optout.


--

Eric Downing

unread,
Aug 27, 2018, 2:54:38 PM8/27/18
to google-ap...@googlegroups.com
Thanks Ross. More and more it seems like I should be using your advgam.


Eric Downing
| Sales Engineer

edow...@upcurvecloud.com

UpCurve Cloud
Office: (310) 400-5803 | Mobile: (786) 431-7918
www.upcurvecloud.com


Reply all
Reply to author
Forward
0 new messages