Grab full filepath for each file in a CSV of drive IDs?

15 views
Skip to first unread message

CH

unread,
Jul 1, 2024, 10:46:10 AM (2 days ago) Jul 1
to GAM for Google Workspace
We have an e-discovery request from our Legal department that is asking for the full filepath/folder tree for a list of documents that were passed over in a Vault export.

We have a spreadsheet of the drive IDs and owners, and are looking to append two columns with document title and, primarily, the full filepath/folder tree for each respective file. There are tens of thousands of Drive files in this CSV, so a bulk script is obviously needed.

I've been working on something, but it's been slow going and I realized it might be good to ask here!

Thanks in advance.

Ross Scroggs

unread,
Jul 1, 2024, 11:13:20 AM (2 days ago) Jul 1
to google-ap...@googlegroups.com

Let's assume that your CSV file (FileList.csv) has at least two columns: Owner,id


gam redirect csv ./FileInfoPaths.csv multiprocess csv FileList.csv gam user "~Owner" print filelist select "~id" norecursion fields id,name,mimetype fullpath



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 on the web visit https://groups.google.com/d/msgid/google-apps-manager/c55922eb-6a50-42b5-a97c-adf99eba6455n%40googlegroups.com.

Cory Hartmann

unread,
Jul 1, 2024, 12:04:56 PM (2 days ago) Jul 1
to google-ap...@googlegroups.com
Ah, duh. My mistake! My existing CSV does not contain the file owners, but, rather, contains the user who has access to the file. That's why what I was working on wasn't working.

So that means it'll need to do a couple of things: identify the file owner, and then query the full filepath using that newly identified file owner. Bonus points if it's able to deduplicate files (multiple users shared on the same file = one file owner & path), but not necessary.


--

Cory Hartmann (he/him)

Manager, SaaS Operations

Enterprise Productivity



620 Eighth Avenue

New York, NY 10018

212-556-8969

cory.h...@nytimes.com



You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/9TLwPJBZdY0/unsubscribe.
To unsubscribe from this group and all its topics, 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/7E2EB4F8-874A-4B5F-92FB-D01CBE42AE85%40gmail.com.
Reply all
Reply to author
Forward
0 new messages