
So my JS and Google scripting are rudimentary at best. Understand I am a marginally functional python programmer for data analytics. Using the resources already here on stack I found wonderful solutions here: 1 and here 2 that I was able to cobble together a working script. I need these files to go from my drive to a team drive where they are eventually worked on.

So here is the criteria: I have the files being created with the same naming convention with only the date changing. Try as I might, nowhere have I found a way for Alteryx to do this. These files need, in actuality, in a Team Drive folder. I tried to hit the Undo button, but it did not bring the file back, and it never appeared in my trash bin.At the core of the issue is I have an Alteryx job dropping files into my google drive. Second, when deleting files, normally there’s an “Undo” option for a few seconds after the file is deleted, and furthermore after that the file is in the Trash folder and can be restored. Two important notes – although it looks like you’re deleting the file, and Google doesn’t provide its standard message that other users with whom the file is shared can still see it, in my experiments the original user still has their file just fine and receives no notifications that you’ve deleted it on your end. Another option I tried from a different answer was to edit the sharing options and remove myself as a collaborator, but that didn’t remove it from my Google Drive either. Instead, this deceptively simple 4th answer by an anonymous user who never answered anything again just “Just drag it physically to bin file.” I can’t believe I didn’t try that, but in fairness, the perfectly good right-click menu option with the trash can was grayed out, so I assumed it was impossible.

It’s not the accepted answer, which says to right click the file and click “Remove”, which didn’t work for me, as evidenced in the video above. The second difference is the one described by this article: you can’t right-click and hit Remove or Move to Trash for some reason.įor reference, after a number of frustrating searches, I found this answer on StackExchange. The first difference is that to the right of the file name, you can see a small Shared Drives icon, indicating that the file resides in a Shared Drive (whether you have access to it or not). If instead a user were to create a Shared Drive, then create a file within that shared drive and share only the file with you (and not the Shared Drive itself), that file will show up for you pretty much like a normal file, with two differences. A normal shared file is created by a user in their My Drive section, then shared. The issue appears to be that this file is not just any shared file.
