Windows Scripting
From Andreida
directory of current script
change to the directory of the executed script:
chdir /D %~dp0
The /D allows to change drives too.
functions
@echo off echo 1 call :func_1 2 call :func_1 3 echo 4 exit /B :func_1 echo %1 (called in a function) exit /B 0
Output:
>test 1 2 (called in a function) 3 (called in a function) 4