title: Windows Batch: replace %20 to space
body: <p>I am writing a <a href="https://msdn.microsoft.com/en-us/library/aa767914.aspx" rel="nofollow noreferrer">custom pluggable protocol handler</a>, which is basically the following batch script:</p>
  
  <pre><code>@ECHO off
  SET "FullPath=%~1"
  explorer.exe "%FullPath%"
  </code></pre>
  
  <p>However if Windows Explorer passes a UNC with spaces it comes to the script with %20 instead of space:</p>
  
  <blockquote>
    <p>\Groups\Group%20Micro\</p>
  </blockquote>
  
  <p>instead of</p>
  
  <blockquote>
    <blockquote>
      <p>\Groups\Group Micro\</p>
    </blockquote>
  </blockquote>
  
  <p>Can you help me to figure out a batch script snippet replacing "%20" to " " or "\ " in the string please?</p>
  
  <p>So far I found <a href="https://www.reddit.com/r/Batch/comments/2f02ec/replace_percent_with_bang_in_string/" rel="nofollow noreferrer">Replace Percent with Bang in String</a>, but it requires somehow to replace % with %%, which is a separate task.</p>
  
  <p>Thank you very much.</p>