I find %~dp0 very useful, and I use it a lot to make my batch files more portable.
%~dp0
But the label itself seems very cryptic to me... What is the ~<
~<
%~dp0 expands to current directory path of the running batch file.
To get clear understanding, let's create a batch file in a directory.
C:\script\test.bat
with contents:
@echo off echo %~dp0
When you run it from command prompt, you will see this result:
C:\script\