1.

Solve : creating m3u playlist with batch?

Answer»

Hello, I'm new here and would like to request help on my playlist. I have search but gotten IRRELEVANT topic and thus the creation of this topic.

Scenario:
I found and compiled working batch to CREATE m3u playlist and find that it saves in ANSI which means my non-english songs will end up some thing like this ".mp3". How do I get the batch to save my playlist in UTF-8 format which does accept those characters?

My current batch code:
Code: [Select]ECHO OFF
SET currentfolder="%cd%"
CD ..
SET upperfolder="%cd%"
IF %upperfolder:~-2,-1%==\ SET upperfolder=%upperfolder:\=%
CALL SET folder=%%currentfolder:%upperfolder:"=%\=%%
CD %folder%
TITLE Generating Playlist for %folder%
ECHO.
ECHO Start time: %time:~0,-3%
ECHO Please wait...
FOR /F "tokens=*" %%A IN ('dir /s /b *.mp3,*.wma,*.FLAC') DO CALL :loop "%%~A"
GOTO end

:loop
SET file="%~1"
CALL SET file2="%%file:*%currentfolder:"=%\=%%"
SET file2=%file2:~0,-1%
setlocal enabledelayedexpansion
>>"%folder:"=%.m3u" ECHO !file2:"=!
GOTO :EOF

:end
ECHO End time: %time:~0,-3%
ECHO
PAUSE

Thanks in advance



Discussion

No Comment Found