• Welcome to ForumKorner!
    Join today and become a part of the community.

Batch files: basics

Stefans

Member
Reputation
0
Hello,
I'll explain some basics for creating a batch file

First,
Batch files are created in notepad, or any text editor, and saved as .bat

Batch files are files you can execute.
With this tutorail i won't teach you how to do much things, but just the layout.

first, you should start with
Code:
@echo off
This means, it won't show echo, it will only show the text after echo

Code:
echo text
if you want to show text if you execute the file, you will have to place echo in front
so "echo hello" without the quotes will be shown as hello

Code:
title Stefans tutorial
this will change the title of the file when you open it

Code:
pause
This will "pause" it, you'll have to enter any key to proceed

Code:
cls
This closes the batch file

Code:
color a1
This changes the color of the text, and the background color

Code:
ping google.com
This will ping google, you can place any website you want


This was just a basic tutorial, of the stuff that i know!
 
Top