Files.List request = service.files().list().setQ( "mimeType='application/vnd.google-apps.folder' and trashed=false"); FileList files = request.execute();
Now you can browse all the folders in the βfilesβ and check if any of the folders has the desired header.
Remember to scroll through all pages with:
request.setPageToken(files.getNextPageToken());
Edit:
Perhaps you could take a look at this site . You can add a title to your search criteria, instead you do not need to extract all the folders.
source share