I find %~dp0
very useful, and I use it a lot to make my batch files more portable.
But the label itself seems very cryptic to me... What is the ~<
An example would be nice - here's a trivial one
for %I in (*.*) do @echo %~xI
it lists only the EXTENSIONS of each file in current folder
for more useful variable combinations (also listed in previous response) from the CMD prompt execute: HELP FOR
which contains this snippet
The modifiers can be combined to get compound results:
%~dpI - expands %I to a drive letter and path only
%~nxI - expands %I to a file name and extension only
%~fsI - expands %I to a full path name with short names only
%~dp$PATH:I - searches the directories listed in the PATH
environment variable for %I and expands to the
drive letter and path of the first one found.
%~ftzaI - expands %I to a DIR like output line