I'm trying to import all csv
files in a folder into those many MongoDB
collections (with same names as the file names). I'm trying to do it through command line (mongo.exe
).
I've written the following for loop
but I can't seem to get the syntax right.
>FOR /R %G in (filepath\...\NYSE\*.csv) DO mongoimport --d nyseDb --c %G --type csv --file %G --headerline
The following error was showed up.
E QUERY [thread1] SyntaxError: missing ) in parenthetical @(shell):1:16
I've looked up many places to find corrections, but none of them worked.