Forum Discussion
LauraDaisy
Dec 18, 2017Copper Contributor
How to map full folder path / get a directory
Hi
I want to Map a folder which is used at work for auditing purposes. But I want to Map a folder from my G:Drive and no file paths or locations, just the title of the folders.
When I say...
Dec 18, 2017
Hello,
You can do this with Power Query. Power Query is a free add-in from Microsoft for Excel 2010 and 2013 and built into Excel 2016 as Get and Transform.
Start a new query Get Data > From File > From Folder. Enter the start folder or drive. In the Query Editor you can then use the split command to split out the file path into its individual folders and remove the columns you don't need. Then filter out the rows (folders) you don't want to see and load the query into the Excel sheet.
The nice thing is that this initial setup only needs to happen once. If more files are created in the drive, you simply need to refresh the query and you will have the complete and correct list of files in the folder (and sub folders).