When you create a batch file in Microsoft Windows, you can use this file to run commands. You do not need to know computer programming. All you need to know are a few Microsoft Disk Operating System (MS-DOS) commands. Think of your batch file as a shortcut for Windows. You can use your batch file to run one command or commands for several programs. For example, if you want to shut your computer off, you can create a batch file in Windows, using Notepad.
- Skill level:
Other People Are Reading
Click "Start" and type "notepad" in the search field. Press "Enter."
This launches the text editor application called Notepad, which you can use to type in commands for your computer. You can use any text editor.
Type the following command, including the quotation marks: SHUTDOWN -S -F -T 30 -C "Shutting down in 30 seconds."
Save your Notepad document as "My Backup.bat." Choose "All Files" if you use a Windows version that has a "Save as Type" option; otherwise, Windows saves your file with a ".txt" text extension and it will not run.
Click "Start" and type "mybackup.bat" in the search field. Press "Enter." The batch file you created begins to execute the command to shut down your computer system in 30 seconds. Click "Start" and "Run" and type "SHUTDOWN -A" quickly if you change your mind about shutting down your computer. This aborts the shutdown command.
Tips and warnings
- You can save your Notepad document using any file name as long as you use a ".bat" extension after the file name.
- Change the number from 30 to 60 if you want your computer to shut down in 60 seconds, or change it to any number you desire. Change the message to match the number of minutes you set.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for