Filter GDrive Files that is Unlabelled

31 views
Skip to first unread message

Andhe Wibowo

unread,
Nov 17, 2025, 8:15:26 AM (3 days ago) Nov 17
to GAM for Google Workspace
I'm trying to filter the unlabeled file in the user's Google Drive.

This is my command: gam user vikas...@abc.com print filelist query "not 'labels/o1YbFr2iujRK7EnbmPxdehmgVWvY7VE4EOaSNNEbbFcb' in labels" fields id,name todrive


But always having 'Invalid' error here:
Getting all Drive Files/Folders that match query ('me' in owners and (not 'labels/o1YbFr2iujRK7EnbmPxdehmgVWvY7VE4EOaSNNEbbFcb' in labels)) for vikas...@abc.com
User: vikas...@abc.com, Drive File/Folder Print Failed: Query ('me' in owners and (not 'labels/o1YbFr2iujRK7EnbmPxdehmgVWvY7VE4EOaSNNEbbFcb' in labels)) Invalid
Data uploaded to Drive File:
https://docs.google.com/spreadsheets/d/1iyuH0o4tGnQjsU7xdYUxP31CujrvdkoNLx5DrPe70bs/edit?usp=drivesdk
Recipient: da...@abc.com, Message: abc.com - user vikas...@abc.com Drive Files, Email Sent: 19a91ea6edb03e44
https://docs.google.com/spreadsheets/d/1iyuH0o4tGnQjsU7xdYUxP31CujrvdkoNLx5DrPe70bs/edit?usp=drivesdk

How to resolve this?
Thanks for the advice.

Ross Scroggs

unread,
Nov 17, 2025, 11:53:36 AM (3 days ago) Nov 17
to google-ap...@googlegroups.com
--
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 visit https://groups.google.com/d/msgid/google-apps-manager/418631b1-085a-418a-9a24-64b78e2c36den%40googlegroups.com.

Andhe Wibowo

unread,
Nov 17, 2025, 11:46:53 PM (2 days ago) Nov 17
to GAM for Google Workspace
Hi Ross!

Thank you, this is useful

List the files without the label
gam config csv_output_row_filter "labels:count=0" user us...@domain.com print filelist fields id,name,mimetype showlabels ids includelabels PutLabelIdHere

Is there a way to list the files without a label by OU? Because if we run this one by one, it will not be effective as we have 500 ++ users in our company.

Thank you for your great help.

Andhe Wibowo

unread,
Nov 18, 2025, 8:06:28 AM (2 days ago) Nov 18
to GAM for Google Workspace
Never mind, we found it.

gam config csv_output_row_filter "labels:count=0" ous "'/Employees/Test'" print filelist fields id,name,mimetype showlabels ids includelabels <labelID> > files_to_label.csv

Thanks

Reply all
Reply to author
Forward
0 new messages