How to make sure it's a run.bat file?

I'm trying to make a minecraft server, and the codes this guy left aren't working, and I don't know how to make sure it's a run.bat file. Can anyone please help me?

The video:

@echo off
java -Xms1024M -Xmx1024M -jar minecraft_server.1.8.exe gui
Pause

Try that, you can edit the amount of ram if you want to (Currently its at 1GB). I don't know what you mean by "I don't know how to make sure it's a run.bat file", But yeah…