How do I get a list of files in a folder in Windows?
Penelope Carter
Updated on May 24, 2026
You can use the DIR command by itself (just type “dir” at the Command Prompt) to list the files and folders in the current directory.
How do I copy a list of filenames in a folder?
Press “Ctrl-A” and then “Ctrl-C” to copy the list of file names to your clipboard.
How do I copy only the names of files in a Windows folder?
In MS Windows it works like this:
- Hold the “Shift” key, right-click the folder containing the files and select “Open Command Window Here.”
- Type “dir /b > filenames.txt” (without quotation marks) in the Command Window.
- Inside the folder there should now be a file filenames.txt containing names of all the files etc.
How do I convert a list of files to text?
Here’s a quick and easy way to do it:
- Open a Command Window (Start > Run > cmd) Open the command line.
- Navigate to the folder by using the cd command. If you need to move up a level, use cd ..
- Type the command dir /b>filelist.txt.
- This will create the text file inside that folder.
How do I get a list of files in a folder Windows 10?
Select all the files, press and hold the shift key, then right-click and select Copy as path. This copies the list of file names to the clipboard. Paste the results into any document such as a txt or doc file & print that. Then open notepad, open tempfilename, and print it from there.
How can you display a list of files including the hidden files?
The “ls” command has many options that, when passed, affect the output. For example, the “-a” option will show all files and folders, including hidden ones.
How do I list only file names in Windows?
/W – Displays only filenames and directory names (without the added information about each file) in a five-wide display format. dir c:*. This form of the DIR command will also display directories. They can be identified by the DIR label that follows the directory name.
How do I open a .DIR file?
The easiest way to open a DIR file, or any kind of file, is to use a universal file viewer like File Magic (Download). You can use it to open many different file formats. If it’s not compatible, the file will just open in binary.