Showing posts with label how to creare batch file. Show all posts
Showing posts with label how to creare batch file. Show all posts

How To Create Batch File Or Script In Windows

How To Create Batch File Or Script In Windows

I am going to tell you steps to create a small batch file. 
{ Flow These Steps }

1. Open a new notepad file. You can also use any similar text file editor, like Notepad++.
2. Type the following commands in the text file:

echo off
title Hello World
show title at top
echo File Executed
echo all Done
pause
3. Save the text file with the extension .bat instead of .txt




4. To Run the batch file, simply double-click it. The CMD Window will open automatically with the desired output.


I Am Going to Create Some Batch File for Help to You

1. Shutdown window system batch file

shutdown.exe /s /t 00

2. Create a batch to generate Energy Report

powercfg/energy
                            
C:\WINDOWS\system32\energy-report.html

Save the file as energyreport.bat or any name you like. Keep in mind you use the correct file extension.

3. Create batch file to generate Battery Report

powercfg /batteryreport
                            
C:\Windows\System32\battery-report.html

Save the file as batteryreport.bat or any name you like.

What is Batch Script

What is Batch Script
A batch script is a text file that contains certain commands that are executed in sequence. It is used to simplify certain repetitive tasks or routines in the Windows, DOS and OS/2 operating systems, and is also used in complex network and system administration.
A batch script has a file extension of .bat .cmd or .btm.