Shutting down your computer automatically can save time and energy. Instead of manually powering it off, you can create a simple script using Notepad. This method works on Windows computers and is easy for beginners.
Why Use Notepad for Auto Shutdown?
- Saves energy – your PC won’t stay on all night.
- Prevents overheating – useful if you leave downloads running.
- Convenient – shutdown happens automatically without your input.
- Customizable – you can choose the exact time delay before shutdown.
Steps to Create an Auto Shutdown Script with Notepad
1. Open Notepad
- Press Windows Key + R
- Type
notepadand hit Enter
2. Enter the Shutdown Command
Type the following line in Notepad:
shutdown -s -t 60
Here:
-s= shutdown-t 60= time in seconds (e.g., 60 seconds = 1 minute)
You can replace 60 with any number of seconds you want. For example:
shutdown -s -t 3600→ Shutdown after 1 hourshutdown -s -t 600→ Shutdown after 10 minutes
3. Save the File as a Batch File
- Click File → Save As
- In File Name, type:
shutdown.bat - In Save as type, select All Files
- Choose a location (like Desktop) and click Save
4. Run the File
- Double-click
shutdown.bat - A message will appear saying: Windows will shut down in XX seconds
How to Cancel a Scheduled Shutdown
If you change your mind, you can cancel the shutdown by:
- Open Run (
Win + R) - Type:
shutdown -a - Press Enter → Shutdown will be aborted
Common Shutdown Commands
| Command | Function |
|---|---|
shutdown -s -t 60 |
Shutdown after 60 seconds |
shutdown -s -t 3600 |
Shutdown after 1 hour |
shutdown -r -t 300 |
Restart the computer after 5 minutes |
shutdown -l |
Log off the current user |
shutdown -a |
Abort a scheduled shutdown |
FAQs
Q1: Can I set a shutdown at a specific time (like 10:00 PM)?
Not directly with Notepad, but you can use Task Scheduler to run the shutdown script at a specific time.
Q2: Will this work on Windows 10 and 11?
Yes, the shutdown command works on all modern versions of Windows.
Q3: Can I use this method to restart instead of shutting down?
Yes, replace -s with -r in the script.
Q4: Is it safe for my computer?
Yes, it’s completely safe because it uses Windows’ built-in shutdown function.
Q5: Can I make different shutdown timers?
Yes, you can create multiple .bat files with different timers (e.g., one for 30 minutes, one for 1 hour).
Conclusion
Automatically shutting down your computer with Notepad is a quick and reliable trick. With just a single line of code saved as a batch file, you can control when your system powers off. Whether you want to save energy, manage downloads, or avoid leaving your PC running overnight, this simple script gives you full control.