0

Possible Duplicate:
What does %~dp0 mean, and how does it work?

i had to modify a bat file in my work a few days ago. when i read the file,i found i didn't know what the string "%~dp0" means. i got the explanation of it on the microsoft web site. it said "%~dp0 Expands %0 to a drive letter and path." my question is what dose expand mean? why the result is driver letter + path,not driver letter + path + the name of bat?

Community
  • 1
  • 1
user1039304
  • 365
  • 5
  • 10

1 Answers1

4
  1. Expands means that the identifier is replaced with its value.

  2. dp means drive letter and path. %0 alone would include the filename.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964