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?
Or it is just a weird label?
I'd also like to know if it is a documented feature, or something prone to be deprecated.
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…