---
title: "List all files and folders in a selected folder&#8217;s directory tree in Google Drive using Google Apps Script"
author: "Martin Hawksey"
date: 2023-06-26T21:38:04+00:00
canonical_url: https://pulse.appsscript.info/p/2023/06/list-all-files-and-folders-in-a-selected-folders-directory-tree-in-google-drive-using-google-apps-script/
markdown_url: https://pulse.appsscript.info/p/2023/06/list-all-files-and-folders-in-a-selected-folders-directory-tree-in-google-drive-using-google-apps-script.md
categories:
  - "Drive"
  - "Intermediate"
  - "Solutions"
tags:
  - "@LifeOfSpy"
  - "yagisanatode.com"
featured_image: https://pulse.appsscript.info/files/2023/06/List-all-files-and-Folders-in-a-Directory-Tree-in-Google-Drive-with-Apps-Script-1200x675-1.png
description: "This is an excellent detailed step-by-step tutorial from Scott Donald all about how to efficiently list all files and folders in a folder's directory tree in Google Drive using Google Apps Script. The in parents method is one we've covered before in Pulse, but Scott provides a very comprehensive explanation of what's going on, plus all the code is available if you would like to reuse in your own projects."
---

# List all files and folders in a selected folder&#8217;s directory tree in Google Drive using Google Apps Script

![List all files and folders in a selected folder&#8217;s directory tree in Google Drive using Google Apps Script](https://pulse.appsscript.info/files/2023/06/List-all-files-and-Folders-in-a-Directory-Tree-in-Google-Drive-with-Apps-Script-1200x675-1.png)

> A fast approach to get all items in a directory tree in Google Drive with Google Apps Script. Contains video and edge case handling.

This is an excellent detailed step-by-step tutorial from Scott Donald all about how to efficiently list all files and folders in a folder’s directory tree in Google Drive using Google Apps Script. The `in parents` method is one we’ve covered before in Pulse, but Scott provides a very comprehensive explanation of what’s going on, plus all the code is available if you would like to reuse in your own projects.

Source: *[List all files and folders in a selected folder’s directory tree in Google Drive: Apps Script – Yagisanatode*](https://yagisanatode.com/list-all-files-and-folders-in-a-folders-directory-tree-in-google-drive-apps-script/)

---

*Published by [Martin Hawksey](https://pulse.appsscript.info/p/author/admin/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2023/06/list-all-files-and-folders-in-a-selected-folders-directory-tree-in-google-drive-using-google-apps-script/](https://pulse.appsscript.info/p/2023/06/list-all-files-and-folders-in-a-selected-folders-directory-tree-in-google-drive-using-google-apps-script/)*
