--
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/2b39e0de-65c2-4a14-946f-2e81eb77d1cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
$gam redirect csv ./fileist.csv user specif...@domain.com print filelist fields id,title,permissions filepath
And I believe it's pulling all the information I need, plus some...
gam all users print users primaryemail | gam csv - gam redirect csv ./~~primaryEmail~~-filelist.csv user ~primaryEmail print filelist fields id,title,permissions file path
Ross
--
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-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@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/893e19a9-cee9-467a-891a-3979ebc0152a%40googlegroups.com.
Add this to your script: perl -i -pe 's/\r//' users.csv
#!/bin/bash
perl -i -pe 's/\r//' users.csv
while read -r LINE; do
/<PATH>/gam redirect csv ./Output/"$LINE".csv user "$LINE" print filelist fields id,title,permissions filepath
done < users.csv
Thanks Ross! You've been amazingly helpful and I can't express my gratitude!But as a small thank you I can show you what I came up with as a solution, in case anyone else is trying to do something similar.In the interests of not having a single file that was completely obscene I figured it might be best to have a separate file for each user.I figures out a way to generate a separate file for each user by first creating a file with each user on a separate line using the command;gam print users emails > users.csvThen I used MSExel and trimmed all the headers and excess info other than email address, so I have a simple list of user email addresses that looks like this;... etc.Then I created this simple bash script;$cat filelist.sh
#!/bin/bash
while read -r LINE; do
/<PATH>/gam redirect csv ./Output/"$LINE".csv user "$LINE" print filelist fields id,title,permissions filepath
done < users.csv
And voila, I've got a directory with a separate file for each user, showing their files, shares, permissions, etc.$ls Output/
Not sure why the username is getting that '?' appended to it, but the contents of the files are correct at least.If you have a thought as to why my script is inserting the ? into my filenames I'd appreciate the guidance.And thanks again for your support of this, I've found it, and you, insanely helpful!!!
On Friday, January 5, 2018 at 11:55:57 AM UTC-8, Ross Scroggs wrote:
Cuda,To get all of the output in a single file, do this.gam config auto_batch_min 1 redirect csv ./filelist.csv multiprocess all users print filelist fields id,title,permissions file pathTo get the output in a file per user, do this:gam all users print users primaryemail | gam csv - gam redirect csv ./~~primaryEmail~~-filelist.csv user ~primaryEmail print filelist fields id,title,permissions file path
Ross
On Fri, Jan 5, 2018 at 11:31 AM, Cuda Prime <cuda...@gmail.com> wrote:
Hi Ross!Thanks for the information, I've installed your GAMADV, and it appears to be functioning as intended as I can run the command:$gam redirect csv ./fileist.csv user specif...@domain.com print filelist fields id,title,permissions filepath
And I believe it's pulling all the information I need, plus some...
But I'm not so savvy that I can figure out how to best use this for my situation.In short I would like a command that lists every file in my organizations Drive, its path, who the owner is, who the files are shared out to and with what permissions.Is that possible with one command, and if so, is that wise?Meaning, would the file created be fairly ridiculous in size considering a user base of 300, some with thousands of files owned?I'm thinking perhaps a batch file that has a list of all the users, puts them in an array, then runs the command for each generating a unique filename, so in the end I would have 300 uniquely named files, showing the file ownership and shared permissions of each of my users.Not that I'm so savvy I know exactly how to write that yet, but I'm hopeful I can figure out the bash scripting needed. :)But what do you think?Thanks again Ross, I really appreciate your time and help!
--
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-manager+unsubscribe...@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/893e19a9-cee9-467a-891a-3979ebc0152a%40googlegroups.com.
--
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-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@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/c614fe7d-1493-4544-942b-26e1b3f91f73%40googlegroups.com.
Please disregard the question about the added ?
--
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-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@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/679b8959-eedf-44d2-9991-1a10437d98b3%40googlegroups.com.
gam redirect csv ./test.shared.csv user testuser1@domain.com print filelist fullquery "sharedWithMe=True and not ('me' in owners)" fields id,title,permissions,sharinguser filepath
I get...
ERROR: Invalid argument: Expected <alternatelink|appdatacontents|appproperties|cancomment|canreadrevisions|capabilities|copyable|createddate|createdtime|description|editable|explicitlytrashed|fileextension|filesize|foldercolorrgb|fullfileextension|hasaugmentedpermissions|headrevisionid|iconlink|id|isappauthorized|lastmodifyinguser|lastmodifyingusername|lastviewedbyme|lastviewedbymedate|lastviewedbymetime|lastviewedbyuser|md5|md5checksum|md5sum|mime|mimetype|modifiedbyme|modifiedbymedate|modifiedbymetime|modifiedbyuser|modifieddate|modifiedtime|name|originalfilename|ownedbyme|ownernames|owners|parents|permissions|properties|quotabytesused|quotaused|restrict|restricted|shareable|shared|sharedwithmedate|sharedwithmetime|sharinguser|size|spaces|star|starred|thumbnaillink|title|trash|trashed|userpermission|version|view|viewed|viewedbyme|viewedbymedate|viewedbymetime|viewerscancopycontent|webcontentlink|webviewlink|writerscanshare>
Help: Syntax in file /Users/Cuda/GAM/GamCommands.txt
Help: Documentation is at https://github.com/taers232c/GAMADV-X/wiki
--
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-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@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/CALDsw%3DR4XKJGPBLhhOVWOQ6-Ho2pL7SD%3D8_8RRYjz9q5K44Ezw%40mail.gmail.com.
$gam version
GAM 4.55.09 - https://github.com/taers232c/GAMADV-X
Ross Scroggs <ross.s...@gmail.com>
Python 2.7.14 64-bit final
google-api-python-client 1.6.4
oauth2client 4.1.2
Darwin-17.3.0-x86_64-i386-64bit x86_64
Path: /Users/Cuda/GAM