• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » Fundamental » Computer » What is batch file? – Definition
Next →
← Prev

What is batch file? – Definition

By Dinesh Thakur

A batch file is a text file containing a series of commands that the operating system will carry out for you, one at a time. A batch file is a batches (bundles or packages) of DOS commands into a single file. MS-DOS batch files consist of the normal operating system commands (e.g. DIR, DEL, COPY and MKDIR) together with some extra commands such as IF, FOR, GOTO, SHIFT and PAUSE that provide conditional control of execution and enable PARAMETERS to be passed so that the same batch file can be used in many different contexts. Under UNIX, batch files are called SHELL SCRIPTS, and are written in a c-like scripting language.

A batch file, such as WP.BAT, ends with the letters .BAT. When the user types in the name of a batch file and presses Enter at the DOS prompt, the commands in that batch file are performed one at a time-with no additional instructions from the user. For example, if the user typed WP and pressed Enter, WordPerfect (a popular word processing program) would start.

Batch files are great when you use a given set of commands repeatedly-instead of activating each command separately every time you want to carry out that set of commands, you can accomplish the same thing in one step.

A user can create a batch file to perform any routine task. For example, a batch file could be created to prepare a disk for use (a process called formatting). Because the commands are in a batch file, the user doesn’t have to type them herself, or even remember what they are-all the user would have to do is type the name of this batch file to format a disk.

The most important batch file is the AUTOEXEC BAT. This file contains commands that are performed automatically each time the PC is turned on or restarted. Typical AUTOEXEC BAT commands include those which change the system prompt, display the current date and time, and set the directories in which DOS looks for files.

Batch files were very important before Windows came along, when everyone had to deal with DOS (the PC’s operating system). DOS required the user to type everything in-which made each task tedious and easy to make mistakes. Batch files eliminated mistakes because the user no longer typed in the command, just the name of the batch file. With Windows, there is little typing involved in issuing commands.

Instead, the user selects commands from a list called a menu, or he selects an icon that represents the command he wants performed. Automation is still desirable in Windows, but instead of saving a list of typed commands, the user records his actions and saves them in a macro. A macro is like a batch file; when it’s activated, the actions recorded in the macro are carried out.

You’ll also like:

  1. What is batch processing?
  2. What is Batch Processing Operating System?
  3. Batch Processing in JDBC
  4. Batch Operating System
  5. Write a Program to Copy a File using File Handling Functions.
Next →
← Prev
Like/Subscribe us for latest updates     

About Dinesh Thakur
Dinesh ThakurDinesh Thakur holds an B.C.A, MCDBA, MCSD certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps.

Dinesh Thakur is a Freelance Writer who helps different clients from all over the globe. Dinesh has written over 500+ blogs, 30+ eBooks, and 10000+ Posts for all types of clients.


For any type of query or something that you think is missing, please feel free to Contact us.


Primary Sidebar

Computer Fundamental

Computer Fundamental

  • Computer - Home
  • Computer - What is Computer
  • Computer - Definition
  • Computer - Block Diagram
  • Computer - Generations
  • Computer - Characteristic
  • Computer - Advantages
  • Computer - Types
  • Computer - Who Invented
  • Computer - Analytical Engine
  • Computer - Uses
  • Computer - Von Neumann model
  • Computer - Classification
  • Computer - Components
  • Computer - CPU
  • Computer - Bios
  • Computer - ALU
  • Computer - Boot
  • Computer - Control Unit
  • Computer - Bus
  • Computer - ISA Bus
  • Computer - MCA Bus
  • Computer - 32-bit
  • Computer - CPU Cache
  • Computer - Coprocessor
  • Computer - ENIAC
  • Computer - Semiconductor
  • Computer - EISA
  • Computer - BIOS Works
  • Computer - DMA
  • Computer - Floppy
  • Computer - Society Impact
  • Computer - AUTOEXEC.BAT
  • Computer - Batch File
  • Computer - Cloud Computing
  • Computer - Grid Computing
  • Computer - Parallel Computing
  • Computer - Docking Station
  • Computer - 32-Bit vs. 64-Bit
  • Computer - Important Features

Different Computer Types

  • Computer - Supercomputer
  • Computer - Personal Computer
  • Computer - Minicomputer
  • Computer - Microcomputer
  • Computer - Analog
  • Computer - Mainframe
  • Computer - Digital
  • Computer - Laptop
  • Computer - NetBook
  • Computer - Ultrabook

Data and Information

  • Computer - Data and Information
  • Computer - Information Technology
  • Computer - Types of IS
  • Computer - Issues in IT

Other Links

  • Computer - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW