Having trouble with something Windows? Been there, sis. Browse our ever-growing collection of tutorials below, and you just might find something useful!

How To Export File Names To A Text File

 

Exporting file names to a text file can be incredibly useful for a variety of purposes. I use it primarily for cataloging and recording what I have, but the uses are endless. Whether you're a student organizing research documents, a professional managing digital assets, or whatever else, this quick guide will show you how to do it using built-in tools.

 

Step 1: Open the folder you want to grab filenames from
Press open it up in explorer.

 

 

Step 2: Open command
In the address bar, type cmd. This should open up the command panel already located at your folder

 

 

Step 3: Run the command
Type the following into the command prompt and hit Enter:

 

dir /b > filenames.txt

 

 

What the heck does this even mean?
"dir" = lists directory contents.
"/b" (bare format) = removes extra info (like file size or date).
"> filenames.txt" writes output as a text file titled filenames. If you wanted to name the file a different name, swap "filenames" with something else.

 

Step 4: Access your text file
You'll find "filenames.txt" inside your selected folder. It contains a clean list of all file names.

That simple.

 

 

Bonus: Export Folder Names Only
If you want to only export folder names, run this code for step 3:

dir /ad /b > folders.txt

 

 

Another quick tip if you're needing to filter or sort your exported data: copy and paste it into a spreadsheet like Excel or Sheets, mark the data as a table, and filter away.