Export Folder and Subfolder List to Excel (with Quick Steps)

Get FREE Advanced Excel Exercises with Solutions!

Exporting folder and subfolder lists to Excel involves creating a comprehensive list of all the files and directories contained in a particular folder and its subfolders and saving that list in a Microsoft Excel file format. This process is useful for organizing large numbers of files and directories, and it can help users keep track of the contents of their computer’s storage. Today in this article, I am sharing with you how to export folder and subfolder list to excel.

In the following, you will find an overview of exporting folder and subfolder list to Excel.

Overview of export folder and subfolder list to excel

Steps to Export Folder and Subfolder List to Excel

Suppose we have some .xlsx and .txt file and some subfolders inside a folder. Now we will use the Power Query tool to export folder and subfolder list to Excel.

Sample folder for exporting folder and subfolder list to Excel

1st Step: Choose a Folder from the Data Tab

  • First, let’s start with visiting the Data tab and selecting the From Folder option from the Get Data feature.

Using data feature to export data from a folder

  • Second, we will select the folder which we want to export from local storage and click Open.

Choosing the folder from which data is exported

Read More: Export Folder Structure to Excel

2nd Step: Import Data to Worksheet

  • After doing that, a preview window will open, where we will click the Load To option.

Visiting load to option to import data to a chosen location

  • Immediately, a window will open named Import Data, where we will put the cell location for inserting data and hit OK.

Selecting cell location to import data

3rd Step: Editing Data in Power Query Editor

  • Now, we will edit our exported data by visiting the Edit option from the Query feature.

Visiting query feature to edit exported data

  • Hence, when selecting multiple columns, choose Remove Columns from the Manage Columns option to delete columns.

Removing columns using the Power Query editor

  • Therefore, by choosing the folder path column, we will make a duplicate of the column by utilizing the Duplicate Column option.

duplicating column using the Power Query editor

  • After that, we will split the column by hitting the By Delimiter option from the Split Column feature.

Spliting columns using delimiter

  • In the newly popped window, choose the Custom option from the drop-down list.
  • Then, put a delimiter (\), choose Columns from the Advanced Options, and put a column number. As I want to split into 3 columns, I have put 3.
  • Finally, hit OK.

Splitting into multiple columns using the split column feature

  • As a result, you will see that your folder and subfolder lists are split.
  • Now, hit Close and Load to finish your task.

Clicking close and load option to close Power Query editor

  • In conclusion, we have successfully exported the folder and subfolder list to Excel.

FInal output with exported folder and subfolder list to excel

How to Show Folder and File Lists of a Certain Path in Excel

In Excel, it is possible to display a list of files and folders within a certain path using a web browser. This can be useful for organizing and managing large sets of files or for generating reports and summaries of the contents of a particular directory.

Suppose we have a folder containing some .xlsx and .txt files. Now we will utilize our browser to show folder and file lists for a certain path.

Sample folder containing file lists

  • Start with, opening the folder and copying the folder path.

copying path for the selected folder

  • Then opening your web browser paste it into the Address bar and click the ENTER key.

Placing the folder path inside an address bar of a browser

  • Within a short time, you will get the file lists inside your browser.
  • Selecting all the lists press CTRL+C to copy.

File list inside a browser

  • Opening your Excel workbook paste the copied list.
  • Finally, we have the file list in our hand using a certain path. Simple isn’t it?

Final result with file list from a certain path in excel

Things to Remember

  • When exporting a folder and subfolder list, you will need to specify the root directory from which to start the traversal.
  • After the data is exported to Excel, you will need to format the worksheet like applying filters, sorting the data, and adding charts or graphs to visualize the information.

Frequently Asked Questions

  • Can I export a folder and subfolder list to Excel on a Mac?

Yes, it is possible to export a folder and subfolder list to Excel on a Mac by using the Terminal application to generate a list of files and folders in the desired directory, and then copying and pasting that list into an Excel worksheet.

  • What information can be exported to Excel from a folder and subfolder list?

The information that can be exported to Excel from a folder and subfolder list includes file name, size, date created, date modified, and other relevant information.

Download Practice Workbook

You can download our practice workbook from here for free!


In conclusion, exporting a folder and subfolder list to Excel can be a useful technique for anyone looking to manage and organize a large collection of files. Exporting a folder and subfolder list to Excel can provide valuable insights and help to streamline your workflow. Please inform us in the comment section about your experience.

What is ExcelDemy?

ExcelDemy Learn Excel & Excel Solutions Center provides free Excel tutorials, free support , online Excel training and Excel consultancy services for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Wasim Akram
Wasim Akram

Wasim Akram, BSc, Industrial and Production Engineering, Ahsanullah University of Science & Technology, has been working with the ExcelDemy project for 10 months. Currently working as as Excel and VBA content developer who provides authentic solutions to different Excel-related problems and writes amazing content articles regularly. He published almost 150 articles and has many more coming. He is very passionate about learning new things about Microsoft office Suite and Data analysis.

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF