Skip to content

Commit 1901c4e

Browse files
committed
Create C:\Users\Public\mongodb\db directory if it doesn't exist.
Signed-off-by: Trevor Conn <[email protected]>
1 parent ad2ac44 commit 1901c4e

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

startdb-no-auth.bat

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1-
:PUBLIC
2-
@ECHO PUBLIC PATH
3-
start "" "C:\Program Files\MongoDB\Server\3.0\bin\mongod.exe" --dbpath "C:\Users\Public\mongodb\db"
1+
@ECHO off
2+
SET dbpath="C:\Users\Public\mongodb\db"
3+
if not exist %dbpath% (
4+
echo %dbpath% directory does not exist. Creating...
5+
mkdir %dbpath%
6+
echo off
7+
)
8+
9+
start "" "C:\Program Files\MongoDB\Server\3.6\bin\mongod.exe" --dbpath %dbpath%
410
GOTO END
511

6-
:END
12+
:END

0 commit comments

Comments
 (0)