title: Which query string for DriveApp.searchFiles() mimics the Drive search "is:unorganized"?
body: <p>I would like to recreate in Google App Script the search  "is:unorganized", which would be entered in the Google Drive search bar.  My goal is to find orphaned files in a manner other than finding the parents of all files and selecting those which are 'null'.</p>
  
  <p>According to the <a href="https://developers.google.com/apps-script/reference/drive/drive-app#searchfilesparams" rel="nofollow noreferrer">documentation</a> the queries are written according to these <a href="https://developers.google.com/drive/v3/web/search-parameters" rel="nofollow noreferrer">rules</a>.  </p>
  
  <p>However, it's not clear to me how to test for "unorganized".  I've tried:</p>
  
  <pre><code>var orphans = DriveApp.searchFiles(q)
  </code></pre>
  
  <p>with the following qs</p>
  
  <pre><code>"unorganized=true"
  "'unorganized' in parents"
  </code></pre>
  
  <p>For the first, I get the error "Invalid argument: q" because the query is invalid, and in the 2nd I get an error saying the ID doesn't exist because there is no folder called "unorganized". </p>
  
  <p>Does anyone know the q that corresponds to "is:unorganized"?</p>
  
  <p>Thanks.</p>