What about searching for the ID of the file by name first, and then deleting the file by ID instead of name?
There are some circumstances where filenames get mangled just a little bit with unprintable characters so you never see the error.
Search for the file precisely, then start opening the search parameters till you are satisfied that you are getting the one and only file you want, then delete that one file by ID instead of name.
Not sure if that is your issue, but it’s worth a look.
R
--
From:
'Jason Komendat' via GAM for Google Workspace <google-ap...@googlegroups.com>
Date: Friday, January 20, 2023 at 12:46 PM
To: GAM for Google Workspace <google-ap...@googlegroups.com>
Subject: [GAM] Is there a GAM command to delete a file on a Team drive
[EXTERNAL EMAIL]
--
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/1c9ce314-01e7-44ad-a823-11c086f2b435n%40googlegroups.com.
So there is a typo in your command in terms of a closing quote. I’ll assume that’s an accident as you are saying you are getting a result. Instead of an error.
Use a wildcard in your filename search and see if you get results. Gradually work your way to a more generous search parameter. I’m guessing that you will find it.
Rance
.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/edaf3827-7642-427a-a65c-3f30cf992ebdn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/DM8PR06MB7717F4BC9EB82190F1E4241F90C59%40DM8PR06MB7717.namprd06.prod.outlook.com.
Jason:
Yes this is a problem of sorts, but I would fix it by deleting ALL copies of the file we are talking about and then work on discovering an existing single copy by id, then modifying it in the future so this multiple copy thing doesn’t happen again.
It will have a different document id for each user, so it’s not any extra work to discover it before updating the file.
Now shared/team drives might be a better answer as you can manage subscriptions to the share and just update the ONE file.
Hope this helps.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/a390de7b-5916-43aa-9417-b68a6f722cd4n%40googlegroups.com.