[@Echo](/user/Echo) off
'设置目录
set /p db_path=请输入数据库目录:
if "%db_path%"=="" (
set db_path=temp
echo 默认为空在temp目录下
)
set db_path=e:\mongodb\data\%db_path%
'检测目录。。。。。
if not exist %db_path% (
echo 创建目录:%db_path%
md %db_path%
)
set port=1001
bin\mongod.exe -install
bin\mongod.exe --port %port% --dbpath %db_path%