title: How can i get the current path in .cmd file?
body: <p>How can i get the current path in .cmd file?</p>
  <p>I see a ton of people saying</p>
  <blockquote>
  <p>oh just use &quot;cd&quot;</p>
  </blockquote>
  <p>To get the value of <code>cd</code> , I have to set it first, which i can't as i am making it portable.</p>
  <p>I wonder if there is any built-in variable which tell the current path of .cmd script file</p>
  <p>like:</p>
  <pre><code>(C:\test.cmd)
  echo %cur-path%
  &gt;&gt; C:\
  </code></pre>
  <p>I've been searching for the internet for an hour and I can't find a solution others then &quot;cd&quot;, &quot;%cd&quot;.</p>
  <p>A simple &quot;no&quot; will be acceptable</p>