@echo off rem First, chdir into the directory where this batch file (and our Perl script) reside: cd /d "%~dp0" rem Now, invoke our Perl script: C:\perl\bin\perl.exe myscript.pl "%1"