@echo off
setlocal EnableDelayedExpansion
set NAME1=GBA
set CORE1=vba_next_libretro.self
set NAME2=NES
set CORE2=fceumm_libretro.self
set NAME3=GBC
set CORE3=gambatte_libretro.self
set dvr=%~d0
set pth1=%cd:~3%
set pth=%pth1:\=/%
set lstpth=data\retroarch\playlists
for /l %%i in (1,1,3) do (
set nam=!NAME%%i!
set cor=!CORE%%i!
dir /b !nam!>%temp%\tmp.txt
type nul>!dvr!\!lstpth!\!nam!.lpl
for /f "delims=" %%g in (%temp%\tmp.txt) do (
set n=%%g
set gn=!n:~,-4!
echo.ux0:/!pth!/!nam!/%%g>>!dvr!\!lstpth!\!nam!.lpl
echo.!gn!>>!dvr!\!lstpth!\!nam!.lpl
echo.app0:/!cor!>>!dvr!\!lstpth!\!nam!.lpl
echo.0>>!dvr!\!lstpth!\!nam!.lpl
echo.!nam!.lpl>>!dvr!\!lstpth!\!nam!.lpl
echo.>>!dvr!\!lstpth!\!nam!.lpl
)
)
pause
setlocal EnableDelayedExpansion
set NAME1=GBA
set CORE1=vba_next_libretro.self
set NAME2=NES
set CORE2=fceumm_libretro.self
set NAME3=GBC
set CORE3=gambatte_libretro.self
set dvr=%~d0
set pth1=%cd:~3%
set pth=%pth1:\=/%
set lstpth=data\retroarch\playlists
for /l %%i in (1,1,3) do (
set nam=!NAME%%i!
set cor=!CORE%%i!
dir /b !nam!>%temp%\tmp.txt
type nul>!dvr!\!lstpth!\!nam!.lpl
for /f "delims=" %%g in (%temp%\tmp.txt) do (
set n=%%g
set gn=!n:~,-4!
echo.ux0:/!pth!/!nam!/%%g>>!dvr!\!lstpth!\!nam!.lpl
echo.!gn!>>!dvr!\!lstpth!\!nam!.lpl
echo.app0:/!cor!>>!dvr!\!lstpth!\!nam!.lpl
echo.0>>!dvr!\!lstpth!\!nam!.lpl
echo.!nam!.lpl>>!dvr!\!lstpth!\!nam!.lpl
echo.>>!dvr!\!lstpth!\!nam!.lpl
)
)
pause