The command in your screenshot did not have extra spaces but we were thrown off because you wrote
You had an extra space between every pair of dashes. You also add and extra space before db= and collection=.
And why Notepad. Because it is easier to edit a command with an editor rather than the command line.