Getting the directory where your script is located using windows command file

Getting the directory where your script is located it is not really trivial in windows command/script files, but you can get it with the following expression:
set CURRENT_DIR=%~dp0
echo %CURRENT_DIR%