Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Batch Scripting Made Easy: Quick Start for Beginners
Rating: 4.3 out of 5(6 ratings)
118 students

Batch Scripting Made Easy: Quick Start for Beginners

An easy beginner’s guide to learning Batch scripting step by step
Created byTechno King
Last updated 1/2026
English
English [Auto],

What you'll learn

  • After having the course you will feel confident writing scripts and will have basic knowledge of Batch scripting
  • This tutorial discusses the basic functionalities of Batch Script along with examples for easy understanding
  • You will be able to create batch scripts and be ready to move on to the next level
  • Learn to create batch scripts by working with files, folders, and other basic tasks.

Course content

1 section61 lectures1h 26m total length
  • Batch Scripting Made Easy: Introduction1:03

    Unlock batch scripting basics by learning essential commands, special characters, decision making, arrays, and functions in the Windows command prompt to build confidence for beginners.

  • Important Update0:10
  • Batch Scripting Made Easy: Code Editor0:28

    Explore batch scripting basics by choosing a code editor, with Notepad++ recommended, or use Notepad, Visual Studio Code, or Sublime Text, all downloadable from official websites.

  • Batch Scripting Made Easy: Batch Introduction and Batch File Creation1:46

    Discover how batch files automate tasks by writing a script in Notepad or Notepad++, using echo and pause, and saving with .bat or .cmd to create your batch file.

  • Batch Scripting Made Easy: Execute Batch file0:58

    Double-click a batch file to run it and see hello printed in the console, or execute it from the command prompt by navigating to the batch file's directory on the desktop.

  • Batch Scripting Made Easy: Basic Command Part 13:15

    Learn batch scripting basics by using echo to print text, handle quotes, and control command output with echo on, echo off, and at the rate, then create and run test.bat.

  • Batch Scripting Made Easy: Basic Command Part 20:55

    Use the cd command to navigate directories and display the current batch file directory. Verify that cd with no parameters shows the batch file's current directory, such as desktop.

  • Batch Scripting Made Easy: Basic Command Part 30:30

    Explore the verbatch command to display the operating system version number with a practical, hands-on example. Update a script file, save, execute, and observe the version output in the terminal.

  • Batch Scripting Made Easy: Basic Command Part 41:28

    Learn how the dir command lists directory files and subdirectories, showing volume label, serial number, names, dates, sizes, totals, and free space, with help via dir /?

  • Batch Scripting Made Easy: Basic Command Part 51:11

    Learn how to use the dir command with /a to display hidden and system files, and combine h with a to show only hidden files in batch scripts.

  • Batch Scripting Made Easy: Basic Command Part 60:59

    Learn how to list .txt files with the dir command, using an asterisk as a wildcard to end with .txt, then filter and verify results on the desktop.

  • Batch Scripting Made Easy: Basic Command Part 71:00

    Learn to use the pause-batch command to hold the console until a key is pressed, with an example printing hello there and the press any key to continue message.

  • Batch Scripting Made Easy: Basic Command Part 81:30
  • Batch Scripting Made Easy: Basic Command Part 92:23

    Master batch scripting basics by copying 8.txt from the desktop into testb and testa, handling spaces in paths with quotes and defining source and destination.

  • Batch Scripting Made Easy: Basic Command Part 101:03

    Copy .txt files from the test folder to testp using a wildcard and explicit extension, then execute the script and verify four files were copied into testp.

  • Batch Scripting Made Easy: Basic Command Part 111:16

    Copy all contents from the test folder into the testb folder using the copy command; note that directories are not copied. Learn how xcopy overcomes this limitation to include directories.

  • Batch Scripting Made Easy: Basic Command Part 122:59

    Master the xcopy batch command to copy files and directory trees, using slash s to include subdirectories and exclude empty ones and slash e to include empty directories.

  • Batch Scripting Made Easy: Basic Command Part 131:00

    Discover how to use the delbatch command to delete one or more files, specify a path, run the script, and verify that a.txt is removed—remember you can't retrieve it.

  • Batch Scripting Made Easy: Basic Command Part 141:12

    Learn to delete files with the del command and a confirmation prompt using the /p switch. See how the script prompts for deletion of c.txt and records yes or no.

  • Batch Scripting Made Easy: Basic Command Part 150:52

    Master batch scripting basics by using the del command with a wildcard to delete .rtf files in a testb folder, demonstrating verification of deletion.

  • Batch Scripting Made Easy: Basic Command Part 160:37

    Learn how to delete all files in a folder using a batch script by copying the path, updating the script, executing it, and confirming deletion.

  • Batch Scripting Made Easy: Basic Command Part 170:50

    Learn to delete all files in a folder with spaces by wrapping the full path in double quotes, update the script, run it, and confirm deletion in ztesta.

  • Batch Scripting Made Easy: Basic Command Part 181:19

    Learn to use the move batch command to move files across directories, rename directories, and relocate directories, with a practical example moving a.txt into the testb folder.

  • Batch Scripting Made Easy: Basic Command Part 190:43

    Use the move command to rename a directory by updating the script with the source and destination paths, rename testb to testbcde, and verify the change.

  • Batch Scripting Made Easy: Special Characters Part 11:01

    Learn about special characters in batch scripting, including the at symbol to hide command while showing only the command output, and using echo off to display output like hello there.

  • Batch Scripting Made Easy: Special Characters Part 20:56

    Discover how the double colon, or scope resolution operator, acts as a label and command; run a script to print hello there, and use a trailing caret to suppress output.

  • Batch Scripting Made Easy: Special Characters Part 31:08

    Redirects command output to a file or to a null device using the redirect corrector; see an echo example that writes hello there to file.txt on the desktop.

  • Batch Scripting Made Easy: Special Characters Part 41:13

    Explore redirecting echo output to file.txt, learn how overwrite clears data, and apply the append special character to keep old data while adding new.

  • Batch Scripting Made Easy: Special Characters Part 51:31

    Use the append character to add command output to a file without overwriting existing data, and verify that new results are appended to file.txt.

  • Batch Scripting Made Easy: Variables Part 12:18

    Learn how batch scripts handle variables and command line arguments, using %1 and %2, and echoing them to the console, while noting a third argument is ignored.

  • Batch Scripting Made Easy: Variables Part 21:51

    Define variables with the set command, assign values without data types, and print them using echo with percent signs, as shown by the hello there example.

  • Batch Scripting Made Easy: Variables Part 31:00

    Learn that batch variable names and commands are not case sensitive, while variable content can be case sensitive, demonstrated by printing hello there to the console.

  • Batch Scripting Made Easy: Variables Part 41:11

    Learn how extra spaces around batch script variables affect expansion, as space placement can produce no output, a leading space, or the printed value, with echo behavior guiding the results.

  • Batch Scripting Made Easy: Variables Part 50:55

    Define a numeric variable in batch scripting using the /a switch, demonstrating how to store a 32-bit integer and print 20 to the console.

  • Batch Scripting Made Easy: Debugging Part 11:10

    Learn practical debugging techniques for bash scripts using the echo command to inspect variables, track line execution, and identify where errors arise.

  • Batch Scripting Made Easy: Debugging Part 21:00

    Update the script to trigger an error by assigning a value to an undeclared variable, observe the syntax error, and learn how pause aids debugging by keeping the window open.

  • Batch Scripting Made Easy: Debugging Part 31:04

    Learn how to debug batch scripts by logging errors to a file with the toRedirectOperator, capturing output in error.txt from test.bad during script execution.

  • Batch Scripting Made Easy: Debugging Part 42:15

    Learn how to debug batch scripts using the ErrorLevel environment variable, interpret 0, 1, 2 exit codes, and print there is error in your script with a check and pause.

  • Batch Scripting Made Easy: Decision Making Part 12:09

    Master decision making in batch scripting by using if conditions to test variables and execute code in the if block, demonstrated with a and b testing 12 and 10.

  • Batch Scripting Made Easy: Decision Making Part 22:33

    Learn how to use if conditions with command line arguments in batch scripting, define two variables, and validate their values with output like 'the value is correct' for each.

  • Batch Scripting Made Easy: Decision Making Part 32:00

    Master batch scripting basics by testing variables and case sensitivity. See how batch commands are not case sensitive, but variable content determines the output.

  • Batch Scripting Made Easy: Decision Making Part 41:58

    Demonstrate how the if else condition evaluates a test, executes the if or else block, and highlights case sensitivity with string comparisons in batch scripting.

  • Batch Scripting Made Easy: Decision Making Part 51:37

    Demonstrate how to use the if defined statement to test a variable's existence in batch scripting, printing 'variable is present' or 'variable is not present' based on the result.

  • Batch Scripting Made Easy: Operators Part 13:05

    Explore batch scripting operators and arithmetic operations, including addition, subtraction, multiplication, division, and modulus, by defining variables, performing calculations, and printing results.

  • Batch Scripting Made Easy: Operators Part 22:36

    Explore relation operators in batch scripting: equal to, not equal to, less than, less than or equal to, greater than, and greater than equal to.

  • Batch Scripting Made Easy: Operators Part 31:29

    learn to replicate logical operators in batch scripting using nested if conditions, demonstrating and/or behavior with variables and conditional echoes when both conditions hold or one fails.

  • Batch Scripting Made Easy: Operators Part 42:04

    Learn to replicate the logical or operator in batch scripting using multiple if conditions and defined checks to print whether the variable is present or not present.

  • Batch Scripting Made Easy: Operators Part 51:23

    Master the logical not operator in batch scripting by using if not to invert conditions, showing when echo executed prints for a variable value of 1 and suppresses for 10.

  • Batch Scripting Made Easy: Operators Part 62:21

    Master assignment operators in batch scripting, including addition, subtraction, and multiplication. See examples using a += 2, a -= 2, and a *= 2, producing 4, 2, and 4.

  • Batch Scripting Made Easy: Operators Part 71:23
  • Batch Scripting Made Easy: Loop Part 10:57

    Master for loop usage in batch scripting by declaring variables with %% and a single character; run commands conditionally across single or multiple values with parameters auto-assigned in alphabetical order.

  • Batch Scripting Made Easy: Loop Part 21:27

    Demonstrates a batch scripting for loop by declaring a single-character variable, iterating over a list of values, printing them to the console, and observing iterations as the list shortens.

  • Batch Scripting Made Easy: Loop Part 31:14

    learn to loop through ranges using for /l, specify start, increment, and end, and print values from 0 to 5 to the console.

  • Batch Scripting Made Easy: Loop Part 41:18

    Learn to loop through folders with the for command using /d and wildcards, listing and processing folders like test one and test two.

  • Batch Scripting Made Easy: Loop Part 51:22

    Master batch scripting by looping through recursive folders with for /r, defining a path and a variable, and applying a set of files to the do statement.

  • Batch Scripting Made Easy: Array Part 11:14

    Learn to create and access arrays in batch scripting using set to define elements and a for loop to iterate, referencing the index like a of zero.

  • Batch Scripting Made Easy: Array Part 21:08

    Learn to access batch array elements by index using square brackets and the echo command, understand zero-based indexing, and retrieve values at positions zero and one.

  • Batch Scripting Made Easy: Array Part 31:08

    Modify an array in batch scripting by using set to add an element at the last index, then update an index and print the result to the console.

  • Batch Scripting Made Easy: Array Part 41:43

    Learn how to iterate over an array in batch scripting using a for loop, with setlocal and enable delayed expansion to print array elements to the console.

  • Batch Scripting Made Easy: Function Part 10:45

    Define and use functions in batch scripting by declaring and defining them. Call functions with the call command and a function name to perform a specific task.

  • Batch Scripting Made Easy: Function Part 21:34

    Learn how to use the call command to invoke a batch program or subroutine from another, with execution time variable expansion and a practical label display example.

Requirements

  • Windows machine
  • No programming experience needed. You will learn everything you need to know

Description

Batch scripting is a simple and useful way to automate tasks on Windows using basic commands. A batch file is just a text file that contains a list of commands, and Windows runs them one after another. With batch scripting, you can save time by automating everyday tasks instead of doing them manually.


This course is designed especially for beginners who want to learn Batch scripting from scratch. No prior scripting or programming experience is required. Everything is explained in a clear and easy step-by-step manner, making it simple to follow and understand.

In this course, you will:

  • Learn what Batch scripting is and how it works

  • Understand basic commands used in Batch files

  • Learn how to create and run your own Batch scripts

  • Build confidence to continue learning more advanced scripting

The focus of this course is simplicity and practical learning. Each concept is taught in an easy way so that beginners can learn without confusion or fear of scripting.


Don’t wait for others to tell you which skills to learn.


Understand today’s needs, keep up with modern technology, and take your first step into automation.


I’m a professional instructor who has helped thousands of students learn Batch scripting. Join the course and enjoy learning this useful and beginner-friendly skill.

Who this course is for:

  • Beginner windows command line developers curious about the command line
  • Anyone who wants to learn scripting for automation
  • Anyone responsible for IT in an organization