--
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/82f15928-e21c-4dae-b9ac-0acaf71c69b8n%40googlegroups.com.
Jon Pankhurst Sales Engineer - Suitebriar A Google Cloud Premier Partner #stayhomestaysafe |
|
|
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/KJzePbqNpZg/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/CA%2BVVBp-SB9SZKwU%3Dt%3Dd_mGJ8DVa9CaCn_Wq6oEjsx4ymF052mw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAOTWUMzDDodR%3DjpUX2YqW14Y0_j79t1MwuMJcm2A8Dh%3DYGsyog%40mail.gmail.com.
Jon Pankhurst Sales Engineer - Suitebriar A Google Cloud Premier Partner #stayhomestaysafe |
|
|
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CA%2BVVBp9cb1EQBhqWvDiDYDBRQ8-Uzy2K-jxaj6qgv26kwLaZug%40mail.gmail.com.
# Get ID of My Drive
$ gam user us...@domain.com show fileinfo root fields id
User: us...@domain.com, Show 1 Drive File/Folder
Drive Folder: My Drive (012YenC8f12ALUk9XYZ)
id: 012YenC8f12ALUk9XYZ
# Find all shortcuts directly in My Drive
$ gam redirect csv ./shortcuts.csv user us...@domain.com print filelist query "(mimeType = 'application/vnd.google-apps.shortcut') and ('012YenC8f12ALUk9XYZ' in parents)" fields id,name,mimetype
Getting all Drive Files/Folders that match query ('me' in owners and ((mimeType = 'application/vnd.google-apps.shortcut') and ('012YenC8f12ALUk9XYZ' in parents))) for us...@domain.com
Got 1 Drive File/Folder that matched query ('me' in owners and ((mimeType = 'application/vnd.google-apps.shortcut') and ('012YenC8f12ALUk9XYZ' in parents))) for us...@domain.com...
# Verify that shortcuts.csv makes sense
$ more shortcuts.csv
Owner,id,name,mimeType
us...@domain.com,012bpr8ilJYF-ELVTg1P8xbUzcOfs4xyz,My Doc,application/vnd.google-apps.shortcut
# Delete shortcuts
$ gam user us...@domain.com delete drivefile csvfile shortcuts.csv:id
User: us...@domain.com, Trash 1 Drive File/Folder
User: us...@domain.com, Drive File/Folder: My Doc 1, Trashed
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/e16795b7-f651-47a1-bdfa-dee794aa0b60n%40googlegroups.com.
Jon Pankhurst Sales Engineer - Suitebriar A Google Cloud Premier Partner #stayhomestaysafe |
|
|
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/A4E8EA64-1F3C-4E78-BED7-F695A287A691%40gmail.com.
Jon Pankhurst Sales Engineer - Suitebriar A Google Cloud Premier Partner #stayhomestaysafe |
|
|
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/a7459a58-e57f-499b-8c95-bdcf0134fc0an%40googlegroups.com.
Jon Pankhurst Sales Engineer - Suitebriar A Google Cloud Premier Partner #stayhomestaysafe |
|
|
Maybe Ross can bring this one home,When I do gam user <username> show fileinfo <fileID>I can see that the file has two parents.However, if I do gam print filelist, you can show parents by including showparentsOrshowparentsidsaslist, which will merge the parent IDs into one cell.You can do something like gam config csv_output_row_filter "'parents:count>1'" with your filelist to identify the files with multiple parents, or use regex/notregex.. though thinking about regex hurts my head when querying multiple fields (parent.*id)
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/935f4243-5c6f-46d8-b869-a9faea1c3839n%40googlegroups.com.