0

There is removeFile method in DriveApp API for Google App Script, but here it states that this method does not delete file permanently. All the files removed using this method can be found using search bar in Google Drive. Is there a way to delete file permanently from Google Drive using Google APP Script?

  • You need to do research before blindly asking questions – tehhowch May 11 '18 at 11:40
  • I am very sorry, I had seen this answer before but got confused in `Drive.files` and `DriveApp.files` – charles bell May 11 '18 at 14:35
  • 1
    yes, there is the chance to be confused by the native, simpler, and less capable Apps Script implementation of `Drive`, which is accessed by `DriveApp`, and the powerful, "advanced service" `Drive`, which is an Apps Script client library that implements v2 of the Drive REST API. – tehhowch May 11 '18 at 14:46

1 Answers1

1

You can use

DriveApp.getFileById(fileId).setTrashed(true);
Darpan Sanghavi
  • 1,443
  • 2
  • 17
  • 32