List Files in Directory
From Relyimah
Occasionally, I want to get a list of files in a directory for one reason or another. To do this, I do the following:
- Open Command Prompt
- Navigate to the directory you wish to get the list of files for
- Run the following command
Command Prompt:
DIR /W/A-D/B > files.txt
This will store the list of files in "files.txt" as below:
File Contents: files.txt
files.txt text document (1).txt text document (2).txt text document (3).txt text document (4).txt text document (5).txt
As you can see, the "files.txt" file we sent the output to is also included in this list.
