|You could do it in a language like Python, or something lower-level like C++ which will create an executable (.exe) file. You should first learn well the language and compiler tools you are going to use.|
When you type a command at the Command Prompt, the interpreter looks in the following places:
1. Internal command - some commands are simply built into cmd.exe and do not exist as external files.
2. The current directory.
3. Each directory in the PATH. Type SET PATH to see which directories these are.
It looks for files with the extensions .COM, .EXE, .CMD, .BAT and various others. Type SET PATHEXT to find out which extensions these are.