Find the parent of a shared folder

239 views
Skip to first unread message

Will Sultzer

unread,
Mar 6, 2024, 10:30:51 AM3/6/24
to GAM for Google Workspace
Running the command:

gam user us...@domain.com print filetree

Produces a section titled: Shared With Me which contains a number of Folders and Files. 

I am curious if its possible for me to take the ID of one of these folders and locate where exactly it is being shared from. 


Ross Scroggs

unread,
Mar 6, 2024, 10:42:00 AM3/6/24
to google-ap...@googlegroups.com
Will,

This will show you the file owner and the sharing user.

gam user us...@domain.com show filenfo <ID> fields owner,sharinguser

Uou can get its path with:

gam user shari...@domain.com show filepath <ID>

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/466b1cf1-4e8d-4ada-9b61-933010f5c5den%40googlegroups.com.

Will Sultzer

unread,
Mar 6, 2024, 10:56:22 AM3/6/24
to GAM for Google Workspace
Thank you Ross!

Follow up question:

Would it be possible to locate a File/Folder that exists on in a shared folder and move it to a shared drive but leave a shortcut in the Shared Folder? 

I'm looking to transfer all of a user's owned files to a "Former Employees" drive however there exists an issue where the bulk of their drive files exist in shared folders owned by multiple other users. 

Heres an example of what I mean:

[Organizational_Photos] - Owned by User A, shared with User B and User C
-[2017] - Owned by User B, Shared with User C
--[Human_resources_2017] - Owned By User C
----User C's Files

I'm looking to take User C's files and folders that are scattered throughout various shared folders owned by various users and move them to a shared drive but, leave behind a shortcut to the file on the shared drive which would retain its shared properties with User A and User B.

I can certainly handle the scripting portion of this but my main points of issue are finding the parents and parents of parents as well as moving the files but retaining the shortcut.

Sorry if this is confusing
-Will
Reply all
Reply to author
Forward
0 new messages