Skip to main content

What is a Batch Script?

What is a Batch Script? is a general understanding about Batch Scripts or Batch file. Batch file or Batch Script file is a Microsoft DOS, OS/2 or Microsoft Windows Command Line File. Batch Scripts can be a single command or set of commands stored in text file. Batch Scripting execute these commands one after one, in a sequence or more technically commands executed by the command-line interpreter. It is generally used to ease and automate some administrative task in the form of commands sequence in Microsoft Windows. The term "batch" is from batch processing, meaning "non-interactive execution", though a batch file may not process a batch of multiple data.

File Extensions:

Microsoft Windows and Microsoft DOS OS use .bat extension, Windows NT and OS/2 also added .cmd. Batch files for other environments may have different extensions, e.g., .btm in 4DOS, 4OS2 and 4NT related shells.

Internet media type:

application/bat, application/x-bat, application/x-msdos-program, text/plain

How do I run a Batch Script or Batch File?

The Purpose of What is a Batch Script? is to give an overview that how you can just double click on the batch file and it will execute the batch script in sequence. A good approach to run the batch file is from command prompt. In such case, you will need to move into the direction containing the file and type the name of the batch file. For example, if the batch file is “scripts.bat”, you can type scripts.bat or simple scripts will execute the command.

Example Batch File:

Copy below quoted text and paste into a notepad file. Now, save this file as "scripts.bat" on a location, easy to remember.
@ECHO OFF
ECHO "Hello - This is a Batch Script" &echo.
PAUSE

Output of Batch File:

 

Comments

Popular posts from this blog

Setting up per connection Limit Bandwidth on MikroTik Router

Generally, I do not prefer to add any unwanted restriction on the network user until its required due to some Administration reason. I know, there are more ways to tackle this setting up per connection Limit Bandwidth on MikroTik Router question comes into one’s mind but I resolve my concern while using MikroTik PCQs feature in MikroTik Queue Type and then calling this Queue Type to Simple Queue. There are more options for setting up per connection Limit Bandwidth on MikroTik Router but please share your concern to add anything else in this article. Let’s start to add our configurations; I am using WinBox for this Article but you can use anything you are convenient to use. Let’s start Step by Step procedure for Setting up per connection Limit Bandwidth on MikroTik Router, any version.  Setup Queue Types After Successful Login, click on Queues menu. Navigate to Queue Types and Press Add + (Plus Sign) to add a new Queue Type. Type a Name like in my scenario,...

DsReplicaGetInfo failed with status 8453 0x2105 on Windows Server 2008

I have two Domain Controller in my envorinment, Primary Domain Controller is Windows Server 2003 based and Additional domain controller is Windows Server 2008 based. When I Installed New 2008 ADC and after some time, when I check with repadmin /showreps found the error.... DsReplicaGetInfo() failed with status 8453 (0x2105):Replication access was denied. I really worried about Solutions: [ DsReplicaGetInfo failed with status 8453 ]

Event ID 1202 Source SceCli on domain controller - Solved

I was getting rapidly Event ID 1202 Source SceCli on my domain controller. Security policies were propagated with warning. 0x4b8: An extended error has occurred. Advanced help for this problem is available on http://support.microsoft.com. Query for "troubleshooting 1202 events". – Event ID 1202 Source SceCli It was a newly build Windows Server 2012 Domain Controller. I have scenario like this; Before: Primary Domain Controller: Windows Server 2003 (32-bit) Secondary Domain Controller: Windows Server 2008 (32-bit) Now: Primary Domain Controller: Windows Server 2012 Secondary Domain Controller: Windows Server 2008 (32-bit) After successfully DC promotion and after a week, I start getting Event ID 1202 on newly build server. L I tried various solutions but nothing was great except the below one; Solution ( Caution ):  Start > Type CMD > Run As Administrator (Open it on Windows Server 2012: Domain Controller)  Type   dcgpofix /ignoresche...