I have this code which works perfectly,
:process_video FOR /F "delims=\" %%i IN ('dir /b /ad-h /o-d') DO ( SET a=%%i GOTO :found ) echo No subfolder found goto :eof :found echo Most recent video created: &echo. & echo."%a%" if /i "%a:~-3%"=="ESP" else if /i "%a:~-3%"=="GBR" goto:next cd %a% for %%a in (*) do rename "%%a" "%%~na-%a%%%~xa" cd ..\ ren "%a%" "%a% - ESP" echo. echo ESP video has been processed echo. pause exit /b :next echo. echo.ESP Video already processed echo. pause :exit exit /b However I would like to expand the check criteria not only just ESP, but other words.
I tried this, but with not luck:
if /i "%a:~-3%"=="ESP", else if /i "%a:~-3%"=="GBR", else if/i "%a:~-3%"=="SPE" goto:next ANd this
echo Most recent video created: &echo. & echo."%a%" if /i "%a:~-3%"=="ESP" ( goto:next ) else if /i "%a:~-3%"=="GBR" ( goto:next ) else if /i "%a:~-3%"=="SPE" ( goto:next ) else ) echo THis works ) I thought it would be an else if?
I am not sure what I am missing here.
Update:
:found echo Most recent video created: &echo. & echo."%a%" if /i "%a:~-3%"=="ESP" goto:next else goto:GBR :GBR if /i "%a:~-3%"=="GBR" goto:next else goto:SPE :SPE if /i "%a:~-3%"=="SPE" goto:next This works, however, for me it is not clean, why is the else if not working,
Thanks