In this short post, I’m going to show you how to easily copy all filenames in a Window folder to Microsoft Excel.
First a caveat, the main limitation of the method I’m going to show you, is that you cannot copy filenames in subfolders. If you want to learn how to how to copy filenames in subfolders, check out the how to easily copy All filenames in a folder to Excel using MS DOS post.
Let’s jump right into it.
Step 1: Open Excel
Open up excel and then navigate to the folder that contains the files.

Step 2: Navigate to Folder and Select All the Files
Navigate to the folder that contains the files. In the folder that contains the files, select all the files in the folder. You can use the shortcut keys, Ctrl + a.

Step 3: Hold Shift Key and Right Click
Now, holding the Shift key, hover over your selection and right click.

Step 4: Click Copy as Path
In the window that pops up, click copy as path. This copies the file path of all the files to the Clipboard.

Step 5: Paste Filepaths in Excel
Navigate to Excel, I’m using ALT and Tab key, and paste the file paths.

Step 6: Use Replace Function in Excel
We are going to remove the folder path using replace function in excel and we’ll have the filenames.
So double click on one of the cells, select and copy the folder path. Click on Find and Select, scroll down to replace. Click on replace and paste the folderpath. Then click on replace all.

Close the Find and Select dialog. Save your excel document and you have successfully copied all the file names in a folder into an excel document.
That’s it for this post, if you want to learn how to also copy the filenames in subfolders, check out this post on how to copy all filenames in a folder into Excel using MS DOS.
And here’s a short how-to video:
[…] You get the Microsoft windows operating systems, which comes with a Graphical User Interface, also known as GUI. Here’s a short post on how you can easily copy all filenames from a single folder in windows. […]
Super tip
After all those years, you would have expected Microsoft to have added a function to just copy the file names, not the paths.
Excellent
Thank you! worked perfectly and a big time saver.
Thank you.
Excellent, Thank you.
Kongo, buddy, thanks a lot. you rock/
this saved my life
Thank You
Thank you, brilliant, I knew how to get as far as Step 5 from wanting to save folder searches bfore but in those instances, I had wanted to keep the file path names so could locate them at later time.
Step 6 was brilliant, I didn’t think this bit could be possible, only small issue is I couldn’t fully understand your instructions. When I zoomed in on my browser to 300%, I then could see on your image that only PART of the filepath was highlighted and to replace with ‘blank’ – once I could see the image, your explanation made sense and worked a charm!
Thanks again
Sorry to hear you found Step 6 was not clear. I may have overlooked that Excel find and replace was not “obvious.” Tend to happen after you’ve used a software for many years. And you are right, you replace the part of the filepath that is the folderpath with a blank and you have the filenames.
Thank you! Kongo