Copy all Filenames in a Directory to a Text File
December 4, 2011 Leave a comment
This works great if you want to save all the filenames in a directory to a text file.
And Guys You can simply create a list of your Movies folder or Songs folder and Subfolders with this simple command in DOS. Here do like this.
- Open up your command prompt by typing cmd in the run dialog box and hitting Enter.
- Navigate to the directory which has the files and type the following command -
DIR /B /O:N > filename.txt
This will save all the filenames in the current directory to a text file. The text file will be saved in the same directory.
- To save file names from any sub-directories in the current folder, just add /S like -
DIR /B /O:N /S > filename.txt
Here is the example how you how it looks in DOS prompt Window:
ENJOY!!!



