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:

,

27 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. Sunny Uberai Avatar
    Sunny Uberai

    Super tip

  3. bblontrock Avatar
    bblontrock

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

  4. Anurag Hota Avatar
    Anurag Hota

    Excellent

  5. Joanne Avatar
    Joanne

    Thank you! worked perfectly and a big time saver.

  6. Mr. Dipp Avatar
    Mr. Dipp

    Thank you.

  7. Hugh Morrison Avatar
    Hugh Morrison

    Excellent, Thank you.

  8. Mirlan Karabukaev Avatar
    Mirlan Karabukaev

    Kongo, buddy, thanks a lot. you rock/

  9. Joe Avatar
    Joe

    this saved my life

  10. Aleksander Kowalnik Avatar
    Aleksander Kowalnik

    Thank You

  11. Happy Avatar
    Happy

    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.

  12. supakit Avatar
    supakit

    Thank you! Kongo

  13. steve Avatar
    steve

    Neat!

  14. Roger Avatar
    Roger

    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.

  15. Arthur Avatar
    Arthur

    Thanks for this, it worked Perfectly

  16. Anbu Avatar
    Anbu

    Thanks So much.

  17. Sampathkumar Avatar
    Sampathkumar

    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.

  18. Dumsane Avatar
    Dumsane

    Really helpful, thanks

  19. luis Avatar
    luis

    it worked fine
    thank you

  20. mshantz Avatar
    mshantz

    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.

  21. Meghan Avatar
    Meghan

    Thank you thank you thank you!!!!

  22. ram Avatar
    ram

    Thanks. great help in simple way.

  23. Ankush Avatar
    Ankush

    You are a genius 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

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