Just in case someone wonders what %~d0 in a .bat or .cmd file means, here’s the excerpt from help call:
[...]
In addition, expansion of batch script argument references (%0, %1, etc.) have been changed as follows:
%* in a batch script refers to all the arguments (e.g. %1 %2 %3 %4 %5 …)
Substitution of batch parameters (%n) [...]