Want to learn and master Batch Script?

Join Exercism’s Batch Script Track for access to 20 exercises with automatic analysis of your code and personal mentoring, all 100% free.

Explore exercises

About Batch Script

@echo off
setlocal enabledelayedexpansion

set /p backupDir=Enter backup directory:
if not exist "!backupDir!" mkdir "!backupDir!"
for %%f in (*.txt) do (
    set timestamp=!date:~-4,4!!date:~-10,2!!date:~-7,2!_!time:~0,2!!time:~3,2!
    copy "%%f" "!backupDir!\%%~nf_!timestamp!%%~xf"
)
echo Backup complete

20 coding exercises for Batch Script on Exercism. From Clock to Hamming.


Get better at programming through fun, rewarding coding exercises that test your understanding of concepts with Exercism.

See all Batch Script exercises on Exercism

Key Features of Batch Script


Batch Script

Easy to Learn

Batch scripting is simple and accessible for beginners.

Widely Compatible

Batch scripts run on any Windows system without modification.

User Interaction

Batch scripts can prompt for and handle user input dynamically.

Flexible Use

Batch scripting handles a variety of automation tasks effectively.

Command Power

Automate and manage tasks efficiently with Batch scripting.

Stable Performance

Batch scripts run reliably for consistent task automation.

Get mentored the Batch Script way

Every language has its own way of doing things. Batch Script is no different. Our mentors will help you learn to think like a Batch Script developer and how to write idiomatic code in Batch Script. Once you've solved an exercise, submit it to our volunteer team, and they'll give you hints, ideas, and feedback on how to make it feel more like what you'd normally see in Batch Script - they'll help you discover the things you don't know that you don't know.

Learn more about mentoring

Community-sourced Batch Script exercises

The Batch Script track on Exercism has 20 exercises to help you write better code. Discover new exercises as you progress and get engrossed in learning new concepts and improving the way you currently write.

See all Batch Script exercises
Batch Script

Get started with the Batch Script track

The best part, it’s 100% free for everyone.