1

As a follow up question regarding the solution for this question: https://stackoverflow.com/a/50494893/9878092

I am able to upload a file to the team drive, but how can I make it such that if the file has the same name, it will override a pre-existing file in the team drive? For example, if I first upload a file named "File A" and then upload another file named "File A" both to the team drive, how do I ensure that only the most recently uploaded File A is located in the team drive? Thank you.

Eric
  • 264
  • 1
  • 5
  • 15
  • You'd need to search the folder for the file name, check the metadata for the dates, and delete the older file. The upload process itself probably can't overwrite the existing file, and once there are multiple files, there's no point in overwriting the old file with the new file, you'd still have multiple files. You can use advanced drive service to delete a file without sending it to the trash. [StackOverflow answer - permanently delete file](https://stackoverflow.com/a/25750738/2946873) – Alan Wells Jun 05 '18 at 19:42

0 Answers0