title: How to import CSV file to MongoDB on Windows?
body: <p>The mongoshell shows the result of the <code>mongoimport</code> command while trying to import a CSV file into MongoDB:</p>
  
  <p><img src="https://i.stack.imgur.com/mFQxX.png" alt="Image"></p>
  
  <p>I wanted to import a csv file into MongoDB. So I have used the command:</p>
  
  <pre><code>mongoimport -d dbname -c collectionname --type csv --file filename.csv --headerline
  </code></pre>
  
  <p>after executing this command I constantly got an error of <code>missing ; before statement</code>. I stored the file in the path <code>mongo\bin</code> only. Is the command itself wrong or should I save the file any other location than I have saved it now? Can anyone give a way to fix this command?</p>