Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 02-17-2023, 11:14 AM
p45cal's Avatar
p45cal p45cal is offline Power Query to get a list of folders (not files) in a location? Windows 10 Power Query to get a list of folders (not files) in a location? Office 2019
Expert
 
Join Date: Apr 2014
Posts: 956
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

The attached has such a query. Currently it's looking at C:\Users\Public, you'll need to adjust that to your base folder. Thereafter you'll need do nothing except refresh the query to update the results. You refresh the table in the same way as you refresh a pivot table: eg. right-click the table and choose Refresh.

To change the base folder, alter the first line of the query:

2023-02-17_180603.png

or we could put the base folder in a cell and have the query look at that cell, and that cell could be updated with a tiny macro to let you browse for that base folder.
At the moment I've opted to show only unhidden directories (folders), but that can be much more finely tuned.
Attached Files
File Type: xlsx msofficeforums50425.xlsx (16.0 KB, 10 views)
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel power query help ganesang Excel Programming 0 09-20-2021 01:50 AM
Browse, search and copy files from one location to another based on the list given in excel sheet us nmkhan3010 Excel Programming 2 09-07-2020 10:27 AM
Do I need a power query for this one? shabbaranks Excel 5 04-10-2019 03:29 AM
Query and Power Query not working Excel 2016 bl10 Excel 0 07-22-2016 06:25 PM
list folders and files using .vbs file josianne Excel Programming 3 08-18-2014 03:03 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:23 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft