What does %~dp0 mean, and how does it work? Ask Question. up vote 826 down vote favorite. 327. 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 refer to %0, the path to the batch file that includes the ...