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

The Power Query tool can be used to export .xlsx and .txt file inside a folder and subfolder list to Excel.

Sample folder for exporting folder and subfolder list to Excel


Step 1 – Choose a Folder from the Data Tab

  • Go to the Data tab and select the From Folder option from the Get Data feature.

Using data feature to export data from a folder

  • Select the folder to export from local storage and click Open.

Choosing the folder from which data is exported

Read More: Export Folder Structure to Excel


Step 2 – Import Data to Worksheet

  • A preview window will open, click the Load To option.

Visiting load to option to import data to a chosen location

  • Import Data window will pop-up, input the cell location for inserting data and click OK.

Selecting cell location to import data


Step 3 – Editing Data in Power Query Editor

  • Edit the exported data by clicking the Edit option from the Query feature.

Visiting query feature to edit exported data

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

Removing columns using the Power Query editor

  • You can make a duplicate of the column from the Duplicate Column option by choosing the folder path column.

duplicating column using the Power Query editor

  • Split the column by clicking the By Delimiter option from the Split Column

Spliting columns using delimiter

  • In the pop-up window, choose the Custom option from the drop-down list.
  • Input a delimiter (\), choose Columns from the Advanced Options, and enter a column number. Depending on the number of columns you need, enter the desired number.
  • Click OK.

Splitting into multiple columns using the split column feature

  • The folder and subfolder lists are split.
  • Click on Close and Load.

Clicking close and load option to close Power Query editor

  • The folder and subfolder list are successfully exported 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

The Web browser can be used to show folder and file lists for a certain path.

Sample folder containing file lists

  • Open the folder and copy the folder path.

copying path for the selected folder

  • Open the web browser and paste it in the Address bar and Press the ENTER

Placing the folder path inside an address bar of a browser

  • The file lists will be displayed inside your browser.
  • Select the lists, press CTRL+C to copy.

File list inside a browser

  • Open your Excel workbook and paste the copied list.

Final result with file list from a certain path in excel


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


<< Go Back to Power Query Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Wasim Akram
Wasim Akram

Wasim Akram holds a BSc degree in Industrial and Production Engineering from Ahsanullah University of Science and Technology. Over the past 2 years, he has been actively contributing to the ExcelDemy project, where he has authored more than 150 articles. Now, he is working as an Excel VBA and Content Developer. He likes learning new things about Microsoft Office, especially Excel VBA, Power Query, Data Analysis, and Excel Statistics. He is also very interested in machine learning and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo