Simple trick to generate File List in Windows Command line

If you need to create a list of songs stored in the computer, here is the simple way to do that using DOS commands:



  1. Run the command prompt (Start Menu>Programs>Accessories>Command Prompt)
  2. Type in the following command and hit Enter :
    dir /b *.mp3 > Songlist.txt 

  3. You'll see a new text file -Songlist.txt in the directory where you run the command. 
You can change the extension of the file from mp3 to anything you want for searching other types of files. If you need to list all files, just run with all files :
dir /b *.* > Songlist.txt 

Crippled Tip: Create a batch file for this command and run it from any directory you want!

How to create a batch file to run this command?

  1. Open Notepad and type in the command:
    dir /b *.mp3 > Songlist.txt 

  2. Save it as Songlist.bat as file name (and All files as Save as Type  and ANSI as Encoding)
  3. Copy this Songlist.bat and run it from any directory or drive to get a list of mp3 files stored in that directory or drive