Question

I have a folder of many .M3U files each containing a list of file references, e.g.

\Dance\00724347388620-1-1.flac
\Dance\00724347388620-1-11.flac
\Dance\00724347388620-1-15.flac
\Spacers\02480002928928-1-44.flac

How can I convert these to short filename format?

Was it helpful?

Solution

@ECHO OFF
SETLOCAL
FOR /f "delims=" %%m IN ('dir /b *.m3u') DO (
 FOR /f "usebackqdelims=" %%a IN ("%%m") DO ECHO %%~sa
)>%%~nmshort.m3u


GOTO :EOF

Each existing playlist will be converted to samenameshort.mp3 - provided the file mentioned in the list exists.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top