@echo off if not exist yarn*.exe goto l1 set yarn=.\ set home=home yarn.exe slip_it\x_script.exe yarn.exe goto l2 :l1 x_script.exe :l2