print filelist question: are query and select mutually exclusive?

300 views
Skip to first unread message

Jeff Borisch

unread,
Aug 21, 2018, 12:43:01 PM8/21/18
to GAM for G Suite
version: GAM 4.60.07 - https://github.com/taers232c/GAMADV-XTD


I'm trying to find trashed files that lived under a subfolder

gam user USER print filelist select THE_FOLDER_ID query "trashed=true"

applies the select but not the query "trashed=true"

gam user USER print filelist query "trashed=true"

does apply the query but obviously returns everything in that users trash. 

If I include the parent directory with the query syntax it seems to give me what I want but only one level deep (one level deep is what the api docs say I should get but not what I want :) ).

gam user USER print filelist query "trashed = true and 'THE_FOLDER_ID' in parents" filepath id


Is gamadv-xtd working as intended?

Thanks!
Jeff

Jeff Borisch

unread,
Aug 29, 2018, 11:04:13 AM8/29/18
to GAM for G Suite
Can anyone replicate? Am I doing something wrong? The BNF for print filelist implies that the select keyword can cooperate with the query keyword but it does not work for me.

Jeff Borisch

unread,
Aug 29, 2018, 2:29:36 PM8/29/18
to GAM for G Suite
In general when using the query keyword, other "filtering" keywords like select are not applied. The behavior I was describing is normal. 

Ross sorted me out after getting to the base of what I was trying to do. Thanks Ross!


+KimNilsson

unread,
Aug 31, 2018, 3:06:22 AM8/31/18
to GAM for G Suite
Please post the working command.

Jeff Borisch

unread,
Sep 1, 2018, 8:35:39 PM9/1/18
to GAM for G Suite
On Friday, August 31, 2018 at 3:06:22 AM UTC-4, +KimNilsson wrote:
Please post the working command.

In short there is no working command to do what I wanted. Ross told me that in effect query and select are mutually exclusive "filters". He has updated the BNF for gam <user-entity> print filelist to make this more obvious.

The best thing for me to do is send results from a "select <folderid>" to a sheet and do any granular filtering there. 


Jeff Borisch

unread,
Sep 14, 2018, 11:52:20 AM9/14/18
to GAM for G Suite
Using the select keyword also seems to cancel the default application of showownedby me 

The docs imply that this command should list files owned by elise, but it returns all the files in that selected folder owned by any user.

gam user elise print filelist todrive tdtitle elise-6 me select 0B0CgXXXXXXXXXXXXZdmxNMUk filepath fields id permissions owners


showownedby me can be explicitly used and that does return what I expect

gam user elise print filelist todrive tdtitle elise-6 showownedby me select 0B0CgXXXXXXXXXXXXZdmxNMUk filepath fields id permissions owners


Am I reading the docs wrong?

Thanks!

Ross Scroggs

unread,
Sep 14, 2018, 8:27:21 PM9/14/18
to google-ap...@googlegroups.com
Jeff,

You are reading the documentation correctly; the following two commands should be equivalent.
1) gam user elise print filelist todrive tdtitle elise-6                               select 0B0CgXXXXXXXXXXXXZdmxNMUk filepath fields id permissions owners
2) gam user elise print filelist todrive tdtitle elise-6 showownedby me select 0B0CgXXXXXXXXXXXXZdmxNMUk filepath fields id permissions owners

In 1, the default was showownedby any rather than the documented showownedby me.

This is corrected in version 4.60.29.

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-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/b55facdf-00e2-4a76-ba64-5d094fab1f75%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Jeff Borisch

unread,
Sep 17, 2018, 1:11:38 PM9/17/18
to GAM for G Suite


On Friday, September 14, 2018 at 8:27:21 PM UTC-4, Ross Scroggs wrote:

This is corrected in version 4.60.29.



Thanks Ross! Tested and works! 
Reply all
Reply to author
Forward
0 new messages