I just started using deno for the first time. I tried with the name deno.js and then I caught microsoft runtime error. I wrap around my head for solution and I got nothing. Then I renamed my deno.js to some other name with .js . I got my results. Kindly look at it. If I wrong, close my issue or else explain why it happens and solve it.
I can't reproduce it
$ echo "console.log('hello')" >> deno.js
$ deno run deno.js
hello
$ deno --version
deno 1.1.2
v8 8.5.216
typescript 3.9.2
It runs well in mac os and linux. It shows conflict in windows. When I tried in windows Its showing microsoft runtime error. Console is not defined.
Cannot reproduce it on Windows 10 2004. Please provide more details so that others might reproduce it.

I also tried with the command prompt. I got the same error.
When I renamed It to den.js or some other name It works perfect. I also attach that below.

Looks like you Windows configuration is setup to execute JavaScript files from the command line, so when you type a command, Windows looks in your path for any files that end in .js (and likely other scripts files) and tries to execute them. I suspect if, after you renamed it, and then typed den on the command line, you would get the same error you are getting now.
If you haven't done this intentionally, it is likely some sort of walware has enabled it on your system in hopes of exploiting security vulnerabilities on your machine and hoping to trick you into running or double clicking on a script file. I am afraid it has nothing to do with Deno.
After renaming it to den or something except deno.js. It works well. I simply typed den.js. It showing
'den.js' is not recognized as an internal or external command, operable program or batch file.
No program try to execute js file in my system. There may be some conflict in naming.
den not den.js
Yes your are correct. When I typing den
I got the same error.
microsoft runtime error
Why this happen? How can I get rid of this?
After renaming it to den or something except deno.js. It works well. I simply typed den.js. It showing
'den.js' is not recognized as an internal or external command, operable program or batch file.
No program try to execute js file in my system. There may be some conflict in naming.
kitsonk's right. It is likely that your problem is specifically about the Windows path and not the deno program.
Below is the same problem others who used node.js encountered:
https://osric.com/chris/accidental-developer/2016/06/node-js-error-console-is-undefined/
In this page I recommend you view Chris Herdt's comments. to solve your problem.
---part of the comment---
"When you run a command that uses a first token that does not contain an extension, Cmd.exe uses the value of the PATHEXT environment variable to determine which extensions to look for and in what order."
echo %PATHEXT%
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
"The current directory is always searched before the directories specified in the command path."
I'm closing this issue. Since its an issue in the path of window executing js file.
Most helpful comment
kitsonk's right. It is likely that your problem is specifically about the Windows path and not the deno program.
Below is the same problem others who used node.js encountered:
https://osric.com/chris/accidental-developer/2016/06/node-js-error-console-is-undefined/
In this page I recommend you view Chris Herdt's comments. to solve your problem.
---part of the comment---
"When you run a command that uses a first token that does not contain an extension, Cmd.exe uses the value of the PATHEXT environment variable to determine which extensions to look for and in what order."
echo %PATHEXT% .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"The current directory is always searched before the directories specified in the command path."