title: Google Apps Script/ Drive API (Javascript) Remove from Shared With Me
body: <p>Does anyone have any suggestions for how to remove a file from shared with me? I need to do this without actually revoking access, as the people are added via a contact group, so only removing 1 person will not work.</p>
  
  <p>Things to note:</p>
  
  <p>I know using this can find the file:</p>
  
  <pre><code>var files = DriveApp.searchFiles('sharedWithMe');
  //then I set file = what I'm looking for.  
  </code></pre>
  
  <p>However, this will not remove the file from shared with me:  </p>
  
  <pre><code>DriveApp.removeFile(file);
  </code></pre>
  
  <p>I've also tried brute forcing by patching the metadata, except it was to no avail.
  In addition, it is wrong to assume that shared with me is a folder, as when listing parent folders the file returns nothing.</p>