Here's mine command for reference:
mongoexport --db AppDB --collection files --pretty --out output.json
On Windows 7 (MongoDB 3.4), one has to move the cmd to the place where mongod.exe
and mongo.exe
file resides =>
C:\MongoDB\Server\3.4\bin
else it won't work saying it does not recongnize mongoexport
command.