gam show ownership <DriveFileID>|(drivefilename <DriveFileName>) [formatjson]
gam print ownership <DriveFileID>|(drivefilename <DriveFileName>) [todrive [<ToDriveAttributes>]] [formatjson] [quotechar <Character>]
gam report drive filter="doc_id==Put File ID here" > id.csv
Open id.csv in a spreadsheet program
Look in the columns parameters.N.name for a row with the value owner; the adjacent column parameters.N.value will have the owner email address.
This only works if the file has been accessed in the last 180 days.
Start with a CSV file fileids.csv with one column:
id
dddjks-dghhjh-dhjshdjh
uuidsidosiso-hdjsjdjs
gam redirect csv ./fileowners.csv multiprocess csv fileids.csv gam print ownership ~id
fileowners.csv has these headers: Owner,id,title,type,ownerIsTeamDrive,teamDriveId
--
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/CAC6ikXHOUxb9OLAEj3Hh2RhkwLt6bhzYZogQcaA5%3D-gVtbdurw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAJkvRS9X5KG47ZB7p5%3Dtg_go8PmaWeL1Nf%3DLjjXu68wpfXsNGg%40mail.gmail.com.
gam csv fileids.csv gam report drive ~command > id.csv
ERROR: filter="doc_id==MyDocIdHere" is not a valid argument to "gam report"gam csv fileids.csv gam report drive filter ~command2 > id.csv
gam csv fileids.csv gam report drive filter "doc_id==~~id~~" event create > id.csv
With standard Gam id.csv will be ugly as multiple processes are writing to the file at the same time, the data will be intermingled; there will a header row per file id.
You can clean it up a bit by executing this command first: export GAM_THREADS=1
You'll still have multiple header rows but the data from different ids will not get intermingled.
Ross
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAC6ikXE4sikKv34uOPVDMzC4KJJDjNtMmN57zqTFhWEw_AKKxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/CAJkvRS9-A2rRrpuw7_GmdmAgDF06XA9tOG657nok6Q%3DQ%2BOeV6g%40mail.gmail.com.
gam redirect csv ./fileowners.csv multiprocess csv fileids.csv gam print ownership ~id
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/0fcf0f51-5953-4ab8-8437-e75b599674d9n%40googlegroups.com.