File doesnot exist


i follow the same steps and its perfectly run but at the at time of load file i got this error “file does not exist”Screenshot%20(129)

From which dir you issued load command?

Please check the path once again

sorry i did’t understand what you want to say:frowning:

Snapshot shows you issued the command under C:/Users/pawan kumar

Please change to the dir where that .js file existing and issue load again

This is the path of my file…
“C:\Users\pawan kumar\m001\loadMovieDetailsDataset”
now can u tell me please how to change to the dir.

You need to run:

     C:\Users\pawan kumar> cd m001
     C:\Users\pawan kumar> loadMovieDetailsDataset

Then start mongo process and import the js file.


Alternatively, you can also specify the full path of your Javascript file in the load() command in Mongo shell.
So, with reference to the last command in your second screenshot above, you could do this as well:

MongoDB Enterprise Cluster0-shard-0:PRIMARY> load("C:/Users/pawan kumar/m001/loadMovieDetailsDataset/loadMovieDetailsDataset.js")

The file separator “forward-slash” character ("/") works in both Windows and Linux.

If, however, you wanted to use the “back-slash” character ("\") of Windows, then you will have to escape each one. Like so:

MongoDB Enterprise Cluster0-shard-0:PRIMARY> load("C:\\Users\\pawan kumar\\m001\\loadMovieDetailsDataset\\loadMovieDetailsDataset.js")

[quote=“pawankumar19598, post:5, topic:10398”]

According to your file location I see your file is in moo1 folder then in that case you must be in location C:\Users\pawan kumar\m001 > then give the atlas cluster connection.

After connecting to cluster .if you try now load(".js") . this will load the data.