Author: greenday1987

This is taken from another forum but it's handy if you download or rip music and for whatever reason it doesn't have an M3U playlist file and you like to have one. The playlist this script will create will be named 'Folder Name.M3U' for the files contained within the folder.

1. Copy this preformatted text exactly
@echo off
chcp 1252
cd %1
echo %~f1
dir /on/b *.mp3 *.flac *.m4a > "%~nx1.m3u"

and paste it into a new text document. Rename it makeplaylist.bat and put it in C:\

2. Next copy this preformatted text exactly
Windows Registry Editor Version 5.00

@="Make playlist(s)" 

@="cmd /C C:\\makeplaylist.bat \"%L\""

and paste it into a new text document. Rename it to makeplaylist.reg and double-click it. You must be logged on {{#NewWindowLink: an administrator }}.

That's it! Now you can right-click any folder or up to 15 folders and make playlists appear inside all of them; they will be named the-folder-name.m3u. If the option doesn't appear immediately, restart your PC.

Note for dummies
you don't right-click inside the folder you want to make a playlist for, you have to go up a level to the parent folder, then right-click it.
Notes for everyone else
you can add whatever file types you want, add *.ogg , *.ape , anything. The default number of folders this will work on is 15, but you can increase this by following these instructions: [1] However: 16 doesn't = infinity, despite what it says. Create a MultipleInvokePromptMinimum key and set it to 50 (decimal) and you can make Playlists for 50 folders. The folder name character limit in Windows 7 Ultimate is 120; other versions may have different limits. Don't use folder names this long anyway! chcp 1252 ensures characters with accents (like éçèßý) are correctly written in the playlist. You can move the makeplaylist.bat file to anywhere you like, but make sure the correct path is in the registry key.

It overwrites m3u's (with exactly the same name) without prompting. To remove this feature: just delete it with Regedit. I've tested this in Windows XP 32 Bit and 7 Ultimate 64 bit.