title: Path with backslashes to path with forward slashes javascript
body: <p>I'm trying to make a <strong>local</strong> xml file parsing "application" for some colleagues and i'm using the current function to retrieve the files:</p>
  
  <pre><code>function ShowFolderFileList(folderspec) {
      var fso, f, f1, fc, s;
      fso = new ActiveXObject("Scripting.FileSystemObject");
      f = fso.GetFolder(folderspec);
      fc = new Enumerator(f.files);
      s = "";
      for (; !fc.atEnd(); fc.moveNext()) {
          var pathString = fc.item();
          $("#test").append(pathString + "&lt;br /&gt;");
      }
  }
  </code></pre>
  
  <p>The problem with this function it returns a string similar to:</p>
  
  <pre><code>C:\Users\SomeUser\Desktop\cool\Archief\CDATA1.xml
  </code></pre>
  
  <p>I need to replace the backward slashes to forward slashes of the entire string. 
  How to do this?</p>
  
  <p>I tried the replace method:</p>
  
  <pre><code>pathString.replace(/\\/g, "/")
  </code></pre>
  
  <p>But it doesn't seem to do the trick.</p>
  
  <p>Can you guys help me out? </p>