How do I write a command window script/batch file?

Daxxax

Senior member
Mar 9, 2001
521
0
0
I'm not much of a programmer but I was wondering if someone could help me out. I have cable internet access and If I leave my computer on for more then an hour with no traffic I believe my cable company must either take my IP away or lock it up because it usaully takes a few minutes to respond when I come back and try. I have been opening a command prompt lately to speed up the process I type "ipconfig /release_all" to clean my ip settings then type"ipconfig /renew_all" to reset everything and my browser is then ready to rock. My question is is there a way that I could create a batch file of some kind so I can just click a icon and have those two commands run auto. so I don't need to type then in anymore? Thanks
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
use Notepad, type each command as a separate line, do a "save as" with (INSIDE QUOTES) a filename ending in .bat, for example
"cablefix.bat"
(with the quotes, or you'll get cablefix.bat.txt instead.)

You can create a shortcut to it on your desktop, and edit the script by either starting notepad and telling it to show "all files" or going to the file in explorer, right clicking, and choosing "edit" or "open with".
 

jfall

Diamond Member
Oct 31, 2000
5,975
2
0
What DaveSimmons said should work fine.. batch is really just regular commands that will all run when the file runs.