Jump to content
Sign in to follow this  
Kenny McKormick

Boleh Ke Command Prompt Tukar Ke Batch File?

Recommended Posts

Salam

Aku langsung x reti psl mende2 nih,so tolong ajar ye.. Aku taip nih kat command prompt tuk reset ip address aku.

ipconfig /flushdns .... enter

ipconfig /release .......enter

ipconfig /renew .........enter

sebab dh penat nk menaip,aku igt nk sekali klik .bat je dh setel..

tapi boleh ke covert jd .bat? klu bole, cmne? nk isi ape dlm txt doc tue?

salam

(klu post nih x sesuai,mod tolong pindhkn yer..TQ)

Share this post


Link to post
Share on other sites

yup...ko bole jdkan ia sbg batch file...

asasnya, apa2 command dr command prompt bole digunakan dlm batch file...

so, utk batch file tu, ko bole buat cthnya:

@echo off
rem '@' kat dpn ni menandakan ko nk hide apa2...so, kalu '@echo off' bermakna 
rem ko nk hidekan command "echo off"...echo off = ko tanak display apa command yg digunakan kat console tu
rem "rem" ni adalah remark...cuma comment, xkan diexecute oleh system

rem masukkan apa2 yg diperlukan kat sini
ipconfig /flushdns
ipconfig /release
ipconfig /renew

rem letak pause kat last...supaya console tu xkan exit slps execute comand2 tu...
rem so, bole la tengok apa result command2 tu...berjaya ke x...
pause

ni cuma cth...jgn ikut bulat2...supaya anda paham apa yg anda lakukan :D...

cthnya..tambahkan input dr user "adakah anda pasti?"...kalu user input 'y', trus execute command tu, kalu input 'n' keluar program....

n so on

Edited by betik

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...