Windows command line opens files with same name as command

I installed ender js and am running it from the command line. It generates a file called ender.js. Whenever I run the command "ender info" or anything with ender in it, it opens the ender.js file in notepad.

How can I stop the file from opening and get the command to run? It runs when I delete the file, but I need the file.

Windows runs it's own JS executor in the command line. This is in the PATHEXT system variable. This system variable stores an order for file extensions to be executed if there are files in the current directory that match. When I remove JS from that list, the command I am trying to call works. It does mean I won't be able to execute JS files in the browser now, but I have never needed to do that so far.

So uou are trying to run a javascript from the command line? that is what i infered here sorry if i am incorrect. That is done with the C:> cscript jslint.js command from the command line.

You can usually get around this by typing ender.cmd or ender.bat (depends how it is installed).