title: How to replace part of a path using cmd?
body: <p>Hey stackoverflow community,  <br>
  I tried to set up a build system in Sublime Text 3  for my .html files in my xampp/htdocs dir.</p>
  
  <p>Therefore I need to replace part of the filepath and add <br>
  <code>"http://localhost/"</code>
  <br> at the beginning and then call it in the browser. Feel free to post any suggestions.</p>
  
  <p>What I found out so far from other threads:</p>
  
  <pre><code>SETLOCAL ENABLEDELAYEDEXPANSION
  -- represtened by the $file variable in Sublimetext 3 - filepath would look like "${file}" --
  SET filepath="C:\xampp\htdocs\test.html" 
  SET searchstring="C:\xampp\htdocs\"
  SET replacestring="http://localhost/"
  SET modifiedpath=%searchstring%=%replacestring%!
  
  -- not sure about this one but it should work as it does for hardcoded sites --
  "C:\Program Files\Opera\launcher.exe" !modifiedpath!
  </code></pre>
  
  <p>The result that I get from those commands is just the first filepath that I entered opened in the browser.</p>
  
  <p>What am I doing wrong? I could not find any topics on manipulating paths using cmd.
  Systems = W7/32bit and W8/64bit same results</p>
  
  <p>Thanks in advance,
  Peter</p>