How to Easily Copy All filenames in a folder to Excel in Windows


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 CMD 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 1: Open Excel

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 2: Navigate to Folder and Select All the Files

Step 3: Hold Shift Key and Right Click

Now, holding the Shift key, hover over your selection and right click. Don’t let go of the Shift key before you right click.

Step 3: Hold Shift Key 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 4: Click Copy as Path

Step 5: Paste Filepaths in Excel

Navigate to Excel, I’m using ALT and Tab key, and paste the file paths.

Step 5: Paste Filepaths in Excel

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.

Step 6: Use Replace Function in Excel

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 into text check out this post on how to copy file names in windows explorer to text.

And here’s a short how-to video:

,

26 responses to “How to Easily Copy All filenames in a folder to Excel in Windows”

  1. […] 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. […]

  2. bblontrock Avatar

    After all those years, you would have expected Microsoft to have added a function to just copy the file names, not the paths.

  3. Joanne Avatar

    Thank you! worked perfectly and a big time saver.

  4. Hugh Morrison Avatar

    Excellent, Thank you.

  5. Mirlan Karabukaev Avatar

    Kongo, buddy, thanks a lot. you rock/

  6. Joe Avatar

    this saved my life

  7. Happy Avatar

    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

    1. Kongo Avatar

      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.

  8. supakit Avatar
  9. Roger Avatar

    I do not see “Copy to Path” must be doing something wrong

    1. Kongo Avatar

      Step 3 – You need to hold the shift key while you right click on your file selection. Keep pressing on the shift key while you right click.

  10. Arthur Avatar

    Thanks for this, it worked Perfectly

  11. Anbu Avatar

    Thanks So much.

  12. Sampathkumar Avatar

    i have copied 2000 word files from folder for the name creation works.
    its working perfect. thanks a lot.

    1. Kongo Avatar

      Glad you found it useful.

  13. Dumsane Avatar

    Really helpful, thanks

  14. luis Avatar

    it worked fine
    thank you

  15. mshantz Avatar

    I would like to modify the file names and drop them back into file explorer. Is that possible? Thanks!

    PS. Or is there a better way to make mass modifications to file names in a folder?

    1. Kongo Avatar

      I don’t know of a way to rename the files from Excel.
      If you want to easily rename multiple files, check out this post on how to rename files using PowerShell. It will work for any consistent renaming of all types of files on Windows.

  16. Meghan Avatar

    Thank you thank you thank you!!!!

  17. ram Avatar

    Thanks. great help in simple way.

Leave a Reply

Your email address will not be published.

26
0
Would love your thoughts, please comment.x
()
x