Scenario: You have a Windows folder containing a large amount of files that you need to have exported into one text file listing all the filenames. For instance, you might need to copy & paste those filenames into an Excel spreadsheet.
Here’s a quick and easy way to do it:
1. Open a Command Window (Start > Run > cmd)
2. Navigate to the folder by using the cd command. If you need to move up a level, use cd .. If your folder name contains spaces, surround it with quotations.
3. Type the command dir /b>filelist.txt
4. This will create the text file inside that folder. If you want the file output elsewhere, use a fully qualified name. Remember that Windows uses \ as the directory delimiter, not /
The “pretty” alternative: Simply drag and drop the folder into a Mozilla (Firefox) browser. The directory structure will be output in a pretty HTML document.
Super useful. thank you very very much
Very super useful. This firefox trick is amazing!
There is a small windows utility File Names Export, you can do it with one click
Hi There – I’m a bit confused. When I open my dos box it says H:\>
I want to copy files from a folder on a shared drive with the following path
K:\Accounts Payable\Recs WA 2013\Supplier Account Recs A-M\340 – PE 30.04.2013
What am I doing wrong, I can’t seem to get it to work?
neil thanks this was the utility i was looking for.
Very helpful. Thanks!
Super super super useful.Thanks a lot for posting this 😀
Nice, very helpful in deed. Thanks!
Super Useful !!!!!…Thanks a lot
You can simply paste the list into Excel, as follows:
1. Open Windows Explorer and select the source folder in the left pane.
2. Press Ctrl + A to select all items in the right pane.
3. Press and hold the Shift key, then right click on the selection.
4. From the context menu, choose “Copy as Path”.
5. Paste the list into Excel.
I wonder how can you make a list that will also include the directory along with the each file name.
Great stuff. I will use this!
Almost 9 year and this is still working, amazing, thank you!
“Copy as Path” option is simply superb
Any way to get the “owner” column of the date modified to come in as well?