title: How to create a DOSKEY alias command to print Windows %PATH% with every entry on new line?
body: <p>I have the same task as <a href="https://stackoverflow.com/questions/15884892/print-windows-path-with-every-entry-on-new-line">Print Windows %PATH% with every entry on new line</a></p>
  
  <p>I have a task: print all entries of %PATH% variable on new line. For example:</p>
  
  <pre><code>C:\Program Files\
  C:\Windows
  C:\Windows\System32
  </code></pre>
  
  <p>and so on...</p>
  
  <p>which is achievable by <code>echo %path:;=&amp;echo.%</code> as explained <a href="https://stackoverflow.com/a/15885269/7150888">here</a></p>
  
  <p>And I want to assign it to a command alias using <a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/doskey" rel="nofollow noreferrer">DOSKEY</a></p>
  
  <p>But the following script is failing for me</p>
  
  <pre><code>DOSKEY list=echo %path:;=&amp;echo.%
  </code></pre>
  
  <p>Which just prints all of the paths while I'm defining the DOSKEY, and after that, when I try to invoke <code>list</code> command, it just doesn't work.</p>