[How to] Shutdown computer using notepad

Notepad is Text-only editor present in Microsoft operating system.  Notepad files are usually saved with .txt extension but we can change extension according to our use.  Notepad doesn’t have the ability to treat unix- or Mac- style text. So, if we paste some words with Unix or Mac style it cannot display it correctly.

Notepad can be used in various steps of programming. It can also be used to generate Batch files. Files which contain a set of command to be executed by command interpreter is called Batch file.

Today, I am going to show you how to develop a Batch file to shutdown a computer using notepad.


Steps for developing a batch file in-order to shutdown a computer:

1.  Open Notepad and add the codes written below:

@echo off

Title oscience.info


Echo Do you want to shutdown your computer?

Echo 1. Yes

Echo 2. No

Set /p input=”Enter your choice:”

If %input%==1 goto shutdown

If %input%==2 goto exit

Echo Invalid choice : %input%



Goto start



Shutdown –s



2.  Now, click on “File” and select “Save As”.

saving batch file

saving batch file


3.  Now, save the file with “.bat” extension. Eg. Shutdown.bat


Saving Batch file

Saving Batch file


4.  Exit notepad

shutdown program

shutdown program

Now, the program is almost ready. Double click the Batch file when you want to turn off your computer.

Related posts:

  1. [info] Why can’t windows ( notepad ) display Linux text files properly? Windows text editors like notepad cannot display the text files...
  2. [How to] Lock Computer if Repeatedly Entered Wrong Password [how to] Lock computer if repeatedly entered wrong password Windows...
  3. Multilevel queue scheduling Multilevel queue scheduling Multi level queue scheduling was created for...
  4. Types of operating systems An operating system can also be divided into many types...
  5. Nokia Lumia 800. Nokia’s first windows mobile. Nokia has currently introduced Nokia Lumia 800, which is nokia’s...