I am trying to make this batch file read a .txt and use the value it finds (1,2 or 3) to select a song to play. I have written this but it only works if the .txt reads 1 but 2 and 3 do not work.
@echo off
for /f %%i in (startsong.txt) do set ransongforintropicker=%%i
IF %ransongforintropicker% == 1 set ransongforintro=BloodMoon_by_VeoRug.mp3
IF %ransongforintro% == BloodMoon_by_VeoRug.mp3 set ransongforintrotext=Song: Blood Moon By VeoRug
IF %ransongforintropicker% == 2 timeout /t -1
IF %ransongforintro% == Invincible_by_VeoRug.mp3 set ransongforintrotext=Song: Invincible By VeoRug
IF %ransongforintropicker% == 3 set ransongforintro=GoldenMove_by_VeoRug.mp3
IF %ransongforintro% == GoldenMove_by_VeoRug set ransongforintrotext=Song: Golden Move By VeoRug
Could someone please tell me how to fix this or tell me of a better way to do this?