title: How to find folder ID by path in Google Drive API?
body: <p>I'm able to find a Google Drive Folder's ID by searching its name, but how can I find the Folder ID by searching its path?</p>
  
  <p>I'm searching within a Drive that has multiple folders with the same name, but different paths, so I want to ensure I'm finding the correct folder ID.</p>
  
  <pre><code>results = service.files().list(q="name='folder_name'",
          pageSize=10, fields="nextPageToken, files(id, name)",
          supportsAllDrives=True, driveId='driveId', includeItemsFromAllDrives=True, corpora='drive').execute()
  </code></pre>
  
  <p>The above returns multiple folders. I don't see a query parameter for the path.</p>
  
  <p>Sample folder structure:</p>
  
  <pre><code>Food
     \Vegetables
        \Folder 1
          Item 1
          Item 2
          Item 3
        \Folder 2
          Item 1
     \Fruit
        \Folder 1
     \Protein
  </code></pre>