@rem Change the directory to where this .cmd lives: cd /d %~dp0 @rem Launch the script perl -w myscript.pl %*