title: How to create a batch file to repair and start corrupted mongoDB in windows?
body: <p>I am unable to start my mongoDB after an unclean system shutdown. There is a mongod.lock with a size of 1 KB. I want to delete this file and then repair the mongoDB. I deleted the file and tried the command </p>
  
  <blockquote>
    <p>mongod --dbpath "%ProgramData%\mongodb\data\db" --repair</p>
  </blockquote>
  
  <p>But I am getting an error message...</p>
  
  <blockquote>
    <p>I STORAGE  [initandlisten] exception in initAndListen: 72 Requested
    option conflicts with current storage engine option for
    directoryPerDB; you requested false but the current server storage is
    already set to true and cannot be changed, terminating.....</p>
  </blockquote>
  
  <p>Please assist...</p>