0

I have the following folders in google drive:

Folder_1
 |-Folder_1.1
 |   |-File_1
 |   |-File_2
 |-Folder_1.2
 |   |-Folder_1.2.1
 |   |   |-File_3
 |   |-File_4
 |-File_5

I want to get the all files in Folder (including subfolders), i tried using query folderID in parents, but it only work with direct childs file, so how do i get all file in subfolders ?

  FilesResource.ListRequest request = _DriveService.Files.List();
  request.Q = folderID + " in parents";
  request.Spaces = "drive";
  request.PageToken = pageToken;
  var result = request.Execute();
jimbo R
  • 253
  • 2
  • 3
  • 14
  • maybe recursion? – jazb Dec 19 '18 at 03:32
  • Possible duplicate of [List all Files and Folders from Google Drive V2 using .Net](https://stackoverflow.com/questions/42621948/list-all-files-and-folders-from-google-drive-v2-using-net) – Jageen Dec 19 '18 at 03:37
  • did you seen this ? https://stackoverflow.com/questions/42621948/list-all-files-and-folders-from-google-drive-v2-using-net – Jageen Dec 19 '18 at 03:37
  • @Jageen in my example, Folder_1 not Root folder – jimbo R Dec 19 '18 at 03:44
  • 1
    Possible duplicate of [How do I search sub-folders and sub-sub-folders in Google Drive?](https://stackoverflow.com/questions/41741520/how-do-i-search-sub-folders-and-sub-sub-folders-in-google-drive) – pinoyyid Dec 19 '18 at 04:47

0 Answers0