Table of contents
- What is batch scripting?
- An Example
- Old and obselete yet so cool
- Why did batch scripting lose importance and became obselete ?
- Download some of the cool Batch Scripts !!
- Instructions
- What is batch scripting? - top
- An Example
Simple script that takes name of the user and displays it in red color top - Old and Obselete yet so cool- top
- Why did batch scripting lose importance and become obselete ? top
- Download some of the cool Batch Scripts !! top
- Instructions top
A batch script is a list of commands ( MS Dos commands in my case) that are executed by the windows shell.So, its not exactly a program instead its a list of commands. The main advantage of using batch scripting for automating processes is that you don't have to install any additional software in your computer.
In a Batch processing system Operating System collects the programs and data together in a batch before processing starts. An operating system performs the following steps while batch processing:
1. defines job which has predefined sequence of commands, programs and data as a single unit.
2. OS keeps number of jobs in memory and runs them without any manual intervention.
3. First Come First Serve policy is employed for the jobs
4. After job execution, its memory is freed and the output for the job gets copied into an output spool for later processing.
@echo off
set /p name=Please enter your name :
echo.
color 4
cls
echo your name is %name%
pause
1. User interaction is not required during the processing.
2. No special Hardware or firmware is neccasary.
3. All batch scripts can work offline
4. We can schedule them whenever we want.
5. Easy to learn.
1. Any one can open a batch file and edit it, Unless it is converted to executable file.
2. Batch files are difficult to debug.
3. Some times a job may end up with an infinite loop
4. Since batch scripts are capable of accessing sensitive files of OS. They can be harmful.
WARNING !!
Download and use the following files on your own risk. I am not responsible for the loss of information. All of these files are tested by myself. Follow the instructions specified at the bottom of the page properly.
Batch script to add two numbers
Disable your computer's Internet
1. Click on the above links to download the files
2. Open in notepad and save as filename.bat (i.e. with *.bat extension).
3. Run the batch file