What Are Batch Files & How to develop Batch Calculator?

                      BATCH FILES

Batch files allow MS-DOS and Microsoft Windows users to create a lists of commands to run in sequence once the batch file has been executed. For example, a batch file could be used to run frequently run commands, deleting a series of files, moving files, etc. A simple batch file does not require any special programming skills and can be done by users who have a basic understanding of MS-DOS commands.

A good example of a batch file for someone who is more familiar with Windows or the MacOS is to think of a batch file as a shortcut in Windows or an icon on the MacOS. Much like a shortcut, batch files could be used to run one or more commands or programs through the command line.

Another example of a very well known batch file is the autoexec.bat, which is a simple boot file loaded each time the computer is loaded on MS-DOS and early Windows computers. This batch file contained all the necessary commands and programs used to run MS-DOS and Windows each time the computer booted.


Basic Calculator In Batch

Basic calculator written in batch. Copy the given text & paste it onNotepad, save it as calc.bat


@echo off
title Batch Calculator
echo -------------------------https://pkc456.blogspot.com/-------------------------
echo Enter the values with operands (E.g. 1+1):
set /p input=
set /a result=%input%
echo Result is: %result%
echo Wanna continue? Press Y for yes Or N for No
set /p "choice=>"
if %choice%==Y goto 1
if %choice%==N goto end
echo Invalid choice
goto 2

You can also download the text fie from here:BATCH CALCULATOR


Popular posts from this blog

Disabling print for Production In Swift Project

Play youtube video in iOS app

Vector graphics in iOS