title: Passing a node.js script an argument with a space on Windows
body: <p>I'm running a node script from the command line on Windows and am trying to pass in a folder path that includes a space. When accessing this argument, via require modules or via the <code>process.argv</code> variable I don't seem to get what I would expect. For the following command:</p>
  
  <pre><code>node script.js "C:\path\to\folder\with a space\"
  </code></pre>
  
  <p>I seem to get the following value:</p>
  
  <blockquote>
    <p>process.argv[2] = C:\path\to\folder\with a space\"</p>
  </blockquote>
  
  <p>Notice the trailing <code>"</code> in the string. If the argument is passed without quotes, it obviously passes it as different arguments split on the space.</p>
  
  <p>Am I doing something wrong, or is this a bug? And if it is a bug, is there a possible workaround?</p>