The only thing to notice is why someone will click that file to open.
The command prompt will not stop opening untill you restart the computer. This is quite simple right! Read Also: Simple Keylogger Using Notepad Then it again opens that file through first file command then again it gives command to open that file again and this process goes again and again that makes a huge loop that never ends. You execute that file and it read the inside command then it read the command that refers a file to open and that file is itself. bat file and that file is opening itself. The only reason that the command prompt is constantly opening, because the name of the file is the same as we have written inside. Now, here the file name is “example” and we have given the command to start example.bat file. But before that let’s take the file name inside that notepad as example.bat so obviously when you save that file it will be example.bat also.