@echo off rem Directory of this script; ends with backslash rem This should also work with UNC names set tlsubsub=%~dp0 set tlprog= set tldrive=%~d0 set pathsave=%path% %tldrive% cd %tlsubsub% "%tlsubsub%..\..\tlpkg\tlperl\bin\perl" "%~dpn0.pl" %1 %2 %3 %4 %5 %6 %7 %8 %9 pause Done rem cleanup in case of start from command-line path %pathsave% set pathsave= set tldrive= set tlsubsub=