title: Saving result of CertUtil -hashfile to a variable and remove spaces of the hash
body: <p>I want to save a result of </p>
  
  <pre><code>CertUtil -hashfile "path_to_file" MD5
  </code></pre>
  
  <p>to a variable and remove spaces of the hash in command line command (to be more particular, I wan to use this in Command Line of post-processing in VS 2015 C++).</p>
  
  <p>Currently the result is as follows:</p>
  
  <blockquote>
    <p>1) C:\Users\admin>CertUtil -hashfile ping.txt MD5<br />2) MD5 hash of file ping.txt:<br />3) 4f 75 c2 2c 20 b4 81 54 72 2c a5 7c 95 7a 66 88 <br />4) CertUtil:
    -hashfile command completed successfully.</p>
  </blockquote>
  
  <p>I just need the line <code>3)</code> - save the hexa string to a variable and then remove the spaces.
  Thanks a lot!</p>