@echo off SETLOCAL ENABLEDELAYEDEXPANSION set ExcName="None" for /f %%i in ('dir %cd% /a:D /b') do ( if exist %%i/Engine (if exist %%i/*.exe ( set ExcName=%%i goto :FindDir ))) echo Not Find ExePath.... pause goto :Exit :FindDir for /f %%i in ('dir %cd%\%ExcName%\*.exe /b') do ( set ExcName=%ExcName%/%%i goto :FindExeFile ) echo Not Find ExeFile.... pause goto :Exit :FindExeFile cmd.exe /c Start %ExcName% /NewCAVESystem/IsClient.umap -PC0 -PC0MountPawnType=UI -NoTracking -nohmd -LanPlay -USEALLAVAILABLECORES -vsync -execcmds="scalability 4, r.shadow.MaxCSMResolution 2048"