---
title: "FilesApp is a GAS library for retrieving file and folder list in Google Drive"
author: "Martin Hawksey"
date: 2023-02-27T21:52:09+00:00
canonical_url: https://pulse.appsscript.info/p/2023/02/filesapp-is-a-gas-library-for-retrieving-file-and-folder-list-in-google-drive/
markdown_url: https://pulse.appsscript.info/p/2023/02/filesapp-is-a-gas-library-for-retrieving-file-and-folder-list-in-google-drive.md
categories:
  - "Drive"
  - "Intermediate"
  - "Library"
  - "V8"
tags:
  - "tanaikech.github.io"
featured_image: https://pulse.appsscript.info/files/2023/02/1gg6CBO78PI7LsaAQB5Ku1Q.jpeg
description: "The FilesApp library by Kanshi Tanaike has been around since 2018. I have to confess I wasn't aware of this library until I read a more recent post, Retrieving Total File Sizes in Specific Folder of Google Drive using Google Apps Script. Similar to my own post on Creating a Google Drive report in Google Sheets the FilesApp library directly communicates to the Drive API, this library however goes a step further in terms of performance by using UrlFetchApp.fetchAll to handle some asynchronous Drive API calls. "
---

# FilesApp is a GAS library for retrieving file and folder list in Google Drive

![FilesApp is a GAS library for retrieving file and folder list in Google Drive](https://pulse.appsscript.info/files/2023/02/1gg6CBO78PI7LsaAQB5Ku1Q.jpeg)

> When I create some applications using Google Drive, there are often the case which is required to retrieve the file list and folder list. I had prepared the script each time for each case so far. But recently, I thought that if there is a library for retrieving the file and folder list (as a tree), it will be useful for me and other developers.

The `FilesApp` library by Kanshi Tanaike has been around since 2018. I have to confess I wasn’t aware of this library until I read a more recent post, [Retrieving Total File Sizes in Specific Folder of Google Drive using Google Apps Script**](https://tanaikech.github.io/2023/02/24/retrieving-total-file-sizes-in-specific-folder-of-google-drive-using-google-apps-script/). Similar to my own post on [Creating a Google Drive report in Google Sheets](https://pulse.appsscript.info/p/2023/02/creating-a-google-drive-report-in-google-sheets-making-google-workspace-enterprise-solutions-with-google-apps-script/) the FilesApp library directly communicates to the Drive API, this library however goes a step further in terms of performance by using `UrlFetchApp.fetchAll` to handle some asynchronous Drive API calls.

Source: [GAS Library – FilesApp**](https://tanaikech.github.io/2018/06/15/gas-library-filesapp/)

---

*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/02/filesapp-is-a-gas-library-for-retrieving-file-and-folder-list-in-google-drive/](https://pulse.appsscript.info/p/2023/02/filesapp-is-a-gas-library-for-retrieving-file-and-folder-list-in-google-drive/)*
