MongoDB queries from batch script

326 views
Skip to first unread message

vishal joshi

unread,
May 16, 2016, 6:51:36 AM5/16/16
to mongodb-dev
Helllo all,

                 I have a very important question and i really need a answer.....please help...

          i want to write a batch script in windows which can run all mongoDB queries such as creating a databse, creating a collection and inserting and deleting etc. automatically.....i have searched references like hell, but have'nt found anything, 
        I have written script for starting the database, from batch file...hre it is...

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
##setting the path for java as well as mongoDB variables.
set path=C:\Program Files\Java\jdk1.8.0_71\bin;C:\Program Files\Java\jdk1.8.0_71;C:\Program Files\MongoDB\Server\3.2\bin
pause
start mongod --config C:\data\mongo.config --dbpath C:\data\db

pause
start mongo
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


 i want another script another script, which can run all other queries........please help me here......i really need it...

if possible, can you show me some sample scripts to do that................

Thank you.


vishal joshi

unread,
May 17, 2016, 1:38:06 AM5/17/16
to mongodb-dev
Please somebody, answer fast...

Gabriel Russell

unread,
May 17, 2016, 11:09:33 AM5/17/16
to mongo...@googlegroups.com
Hi Vishal,

This forum is for discussions of MongoDB project development, not for discussions about usage.

Would you mind re-posting your question in the mongodb-user forum?


Regards,
Gabriel

--
You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-dev...@googlegroups.com.
To post to this group, send email to mongo...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-dev.
For more options, visit https://groups.google.com/d/optout.

vishal joshi

unread,
May 18, 2016, 12:22:27 PM5/18/16
to mongo...@googlegroups.com
so sorry................i did'nt know that

--
You received this message because you are subscribed to a topic in the Google Groups "mongodb-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-dev/Jehac-7HxJg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-dev...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages