MyDrive: Exporting list of Files and Folder

576 views
Skip to first unread message

William Yox

unread,
Jul 6, 2023, 3:00:00 PM7/6/23
to GAM for Google Workspace
Hey all,

I am trying to export a list of Ids from a specific folder in a user's MyDrive using the following command:

gam redirect csv data.csv user <user> print filetree select <RootID> fields owners,id,mime,size

This exports data successfully but only displays the folders and files where the user is the owner. I want an export of all the data contained in the folder. I plan to use the FileIDs to get the owner and change the ownership of each item.

The easiest thing would be to give this user the Drive Delegate admin role and have him move it to a Shared Drive, but if possible, I'd like to help him preserve his existing filetree.

Thanks!

Ross Scroggs

unread,
Jul 6, 2023, 3:05:59 PM7/6/23
to google-ap...@googlegroups.com
William,

gam redirect csv data.csv user <user> print filelist select <RootID> fields owners,id,name,mimetype,size showownedby any

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/13c2ee9d-52b1-40b6-9cec-9f2ad77d615en%40googlegroups.com.


--

William Yox

unread,
Jul 7, 2023, 9:31:53 AM7/7/23
to GAM for Google Workspace
Thank you Ross. I appreciate it as always.

I hope you have a great weekend. 

Reply all
Reply to author
Forward
0 new messages