Learning what a batch script is

DISCLAIMER for anyone that knows the basics of tech knows what this is and won’t think this post is stupid pls skip this guide :rofl::joy:


A batch script is a list of commands that you can run automatically in the command prompt the batch script, all the commands are processed in order.

Getting Started

  1. Creating the Batch Script

    Open Notepad. This is where we’ll create our batch script. In Notepad, type the following:

    @echo off
    

    The @echo off command mutes all the commands in the script so that only the output is shown to the user.

  2. Adding Commands

    On the next line, add:

    echo Hello, Velt!
    

    The echo command displays the text “Hello, Velt!” in the command prompt.

  3. Pausing the Script

    To pause the script and wait for the user to press Enter, add this line:

    pause
    

    The pause command halts the execution and prompts the user to press any key to continue. This is useful if you want the user to read or do something before proceeding.

  4. Finishing the Script

    Add one final command to indicate the script is done:

    echo This batch script is done.
    

    Your script should now look like this:

    @echo off
    echo Hello, Velt!
    pause
    echo This batch script is done.
    
  5. Saving the Script

    Save the Notepad file by clicking File > Save As. In the “Save as type” dropdown, select All Files. Name your file hellovelt.bat and make sure it has the .bat extension.

  6. Running the Script

    Navigate to the location where you saved the file and double-click it to run the batch script. The output should be:

    Hello, Velt!
    Press any key to continue...
    This batch script is done.
    

Congratulations! You’ve created and run your first batch script.


For a list of basic command check this out


If you found this useful, please give it a like! :stuck_out_tongue_winking_eye:

2 Likes

3 Reasons Why You Should Give Batch Scripts a Go

Batch scripts might sound a bit technical, but trust me, they can make your life a lot easier—and more fun. Here’s why:

  1. Automate Tasks on Your Computer

    Ever feel like you’re doing the same thing over and over again on your computer? Batch scripts can help! With just one click, you can automate those repetitive tasks. Whether it’s organizing files, backing up data, or running a bunch of commands at once, these scripts save you time and hassle.

  2. Take Control of Your Android Device

    If you’re into customizing your Android device, batch scripts can be a game-changer. Using ADB (Android Debug Bridge), you can create scripts that filter your phone, install apps, and more—all with a single click. It’s like having a personal assistant for your phone.

  3. Pranks and Fun with Friends

    Batch scripts aren’t just for serious stuff—they can be a lot of fun too. You can create scripts that play harmless pranks on your friends, like opening a series of funny messages or sounds. As seen here, there are plenty of hilarious ideas to try out.

So, whether you’re looking to save time, customize your gadgets, or just have a good laugh, batch scripts are definitely worth exploring. Give it a try and see what cool things you can come up with!

3 Likes