Robert Weatherman
Robert Weatherman

Reputation: 65

Getting mongoimport validation errors and incompatible options errors

I'm trying to work through the mongo tutorial and keep getting hung up on importing their file. I have moved the file to the bin folder, have re-saved the file using notepad++, both of which were suggested from some previous errors I was getting. Each time I correct something it seems a new error occurs. This latest one seems to be some sort of validation error.

C:\Program Files\MongoDB\Server\3.4\bin>mongoimport --host=127.0.0.1 \ --db >test --collection restaurants --drop --file new-primer-dataset.json

2017-02-05T12:17:20.570-0500 error validating settings: incompatible >options: --file and positional argument(s)

2017-02-05T12:17:20.570-0500 try 'mongoimport --help' for more information

any idea what this could be?

Upvotes: 1

Views: 1179

Answers (1)

Surendra Babu Parchuru
Surendra Babu Parchuru

Reputation: 1012

Place your file path in double quotes, and it worked for me!!

Upvotes: 2

Related Questions