Skip to main content

Writing your first BATCH file


Generally speaking, batch files (files with the BAT extension such as AUTOEXEC.BAT) are text files that can contain a list of multiple commands to be executed. For example, you could write a BAT file to copy multiple files or change the directory or anything you can do using the "Command/DOS Prompt" commands.
It's very easy to create BAT files:
  • Go to the "DOS Prompt" or "Command Prompt"
  • Type following commands in red line by line (press ENTER after each line):


    COPY CON MYBAT.BAT

    ECHO Hello, world! This is my test BAT file!

    CD C:\WORK\9TO5\FOLDERA
    DIR C:\WORK\9TO5\FOLDERA

    ^Z



    Please note that "^Z" is a single character produced by pressing CTRL+Z
  • Run newly created BAT file by typing "MYBAT" and pressing ENTER.
In the above code, we're first saying "hello" to the world, changing the current directory to "C:\WORK\9TO5\FOLDERA" (example directory - you may type in your mostly visited directory here), and finally getting the directory of "C:\WORK\9TO5\FOLDERA"
Although we used the command line to create "MYBAT.BAT" itself, you can create your future BAT files using any text editor. You can then experiment with different commands in your new BAT file.

Comments

Popular posts from this blog

Place Files Inside EXE and Execute them using Gamemaker

I am fond of creating games in Gamemaker and Mugen. However I found an interesting way to create executable files that may contain anything inside them (may be a whole cracked Program) and may act as extractors or copy protectors Tools required  GameMaker 7 or above Procedure  1) Download and Install Gamemaker and start a Game Project by going to File -> New.  2) Every game consists of a Room in which all objects shall act and interact with each other.So Create a new room by either clicking on the icon on Standard toolbar or by going to Resources Menu -> Create Room.Name it anything you want.In my case ROOM0  3)Every Game consists of Objects which are responsible for all interactions. So create a new object by either clicking on the icon on Standard toolbar or by going to Resources Menu -> Create Object.Name it anything you want.In my case VIRUS  4)Now create a new script (Press CTRL+ALT+C or Resources Menu -> Create Script),Name it SCRIPT0...

How to use Keyloggers – Detailed Tutorial and FAQs

Here is a DETAILED tutorial which contains every possible information that you need to know about keyloggers which includes how to use it, how it works etc. WARNING: I highly recommend that you read this post completely since every single piece of information is important. I know most of you are new to the concept of keyloggers. For some of you, this might be the first time you heard about the term “keylogger”. So to give you a clear picture and make you understand better I would like to take up this post in the form of FAQs (Frequently Asked Questions). Here we go… 1. What is a Keylogger? A keylogger (also called as spy software) is a small program that monitors each and every keystroke a user types on a specific computer’s keyboard. A keylogger program can be installed just in a few seconds and once installed you are only a step away from getting the victim’s password. 2. How Keylogger works? Once the keylogger is installed on a PC, it starts operating in the backgrou...

Basic Introduction To SQL Injection

SQl injection is a vulnerability that allows an attacker to influence the queries that are passed to the back-end database.It has been present since the time databases have been attached to the web applications.However, the main credit of bringing SQL injection into public notice goes to Rain Forest Puppy who in 1998 wrote an article on it and in 2000 he wrote another article describing how he hacked one of the popular website on the internet using SQL injection. Before understanding the how SQL injection attacks we need to understand the Simple Three Tier Architectureor a Four Tier Architecture.This will clear your basics and give you a rough idea of how database-driven web applications work. Three Tier Architecture In a simple three tier datbase-driven architecture the three layers that are used are:- Presentation Tier(Browsers) Logic Tier Storage Tier(Database) The three tier architecture follows a linear relationship i.e Presentation Tier connects to the Logic Tier and...