title: mongodb 4 Data directory C:\data\db\ not found
body: <p>I download and install the last vesrion of MongoDb which is 4.0.2 and i set the correct path variable.<br>
  When i want to start the mondoDb service using <code>mongod</code> command i got the following error:</p>
  
  <blockquote>
    <p>exception in initAndListen: NonExistentPath: Data directory C:\data\db\ not found., terminating  </p>
  </blockquote>
  
  <p>i know that i should create the directory missing, but that directory is automatically created in the following path:  <strong>C:\Program Files\MongoDB\Server\4.0</strong>
  I checked the mongod.cfg file and the correct path is already set : <code>dbPath: C:\Program Files\MongoDB\Server\4.0\data</code></p>
  
  <p>Now how to tell the mongo to look for the folder he thinks is missing in the correct path ?</p>