Tuesday, 15 December 2015

How To Create A Playlist Of All The Music Files On Your Computer (Windows)

I download music from here and there and copy files to different folders. So, sometimes I have no idea where my music files are and want to play all of them or make them into a huge playlist. So, I decided to find a way to create a solution and did some research. I found a file searching method using command prompt and modified it a bit to create this solution. Today, I'm going to show you how to make a playlist out of the music files stored on different drives on your computer.  For this, I'm going to write a DOS batch file. You can type the commands on command prompt or make a batch file and run it to get the same result.



First, we need the file extensions for music - mp3, aac, m4a are some music file extensions. I'm going to use these three extensions here. Playlists come in the extension .m3u and .wpl (in the case of windows media player.)

Now, copy the below code into notepad and save as .bat file.

@echo off
for %%a in (c d e f g h i j k l) do if exist "%%a:\" dir /b /s /a-d "%%a:\*.m4a" "%%a:\*.mp3" "%%a:\*.aac" >>"D:\playlistall.m3u"

Now, double click the bat file to run it. This will generate a playlist with .m3u extension, on D drive in this case (you can change it to your preferred drive or location). The newly generated playlist can be opened in KM Player or VLC Media Player. It will contain all the music files on your computer having the formats given in bold.

Related Posts Plugin for WordPress, Blogger...