What does %~dp0 mean, and how does it work? - Stack Overflow 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 ~ doing? Does dp mean drive and path? Does the 0 ref