dos batch file dp0?Advertisement
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 file name? - read more
Microsoft DOS » %~dp0 vs %cd% ... %~dp0 is only available within a batch file and expands to the drive letter and path in which that batch file is located (which cannot change). It is obtained from %0 which is the batch file's name. - read more
Please vote if the answer you were given helped you or not, thats the best way to improve our algorithm. You can also submit an answer or check other resources.