The Command Prompt is one of two command-line interpreters in Windows 11. You can utilize the Command Prompt to create a simple text document that includes all the files within a specific folder. No manual copying and pasting is required for this method. This is how you can extract a list of files for a folder via the Command Prompt in Windows 11.
- Click Windows 11’s magnifying glass taskbar icon.
- Type cmd in the search tool’s box.
- Select Command Prompt to open its window.
- First, open the folder to obtain a file list within the Command Prompt. To do so, enter cd\ followed by a folder path and press Return.
- dir /b >filename.txt
The text file will be generated with the name filename.txt inside the directory.