This repository contains multiple Batch scripts that solve real-world problems, automate tasks, and demonstrate core concepts like:
- File and folder management
- User interaction with
set /p - System utilities (shutdown, restart, etc.)
- Networking commands
- Automation tricks and hidden Windows commands
I regularly update this repository with new projects, so consider starring ⭐ it to stay up to date.
BatchScriptProjects/
│
├── Shutdown-Timer/ # A simple and useful app/program, shuts down your computer after several minutes
│ │
│ ├── script.bat # includes the main batch script
│ ├── single-command.bat # includes compressed script to use it as one single command
│ └── custom-icon.ico # Custom icon to use it as custom command for a shortcut
│
└── More # soon
- Each file is self-contained and well-commented for easy understanding.
- Each file contains the main script in a batch. Some others include the
single-command.batfile, which contains the same script, but is slightly different. To run as a single command.
📌 It is useful when used as a clickable shortcut.
- Example:
-
Create a shortcut anywhere on your computer
-
Add the following script as the target of the shortcut.
cmd.exe /v:on /c "set /p t=Enter minutes to shutdown (Enter=now, x=cancel): & if /i "!t!"=="x" (shutdown /a) else if "!t!"=="" (shutdown /s /t 0) else (set /a s=!t!*60 >nul & shutdown /f /s /t !s!)" & pause
source:
BatchScriptProjects/Shutdown-Timer/single-command.bat -
[optional] Download & Add the
BatchScriptProjects/Shutdown-Timer/custom-icon.icoas the custom icon of the shortcut. -
[In some projects, it is required] Go to the properties of the shortcut >> Advanced >> Run as Administrator >> Ok >> Ok
-
Use it by clicking it; now you have a simple and useful shutdown timer program.
Here are some examples of what's included:
- ✅ Shutdown Timer – Schedule automatic shutdown/restart
- ✅ Folder Generator – Create multiple folders in one go
- ✅ Network Tools – Get IP, MAC address, ping websites
- ✅ File Hider – Combine image + file using
copy /btrick - ✅ User Prompt Scripts – Interactive scripts with input validation
- Great for beginners to learn Batch scripting step by step
- Useful for automation lovers who want quick solutions
- A growing collection with practical use cases
- Windows 7/10/11
- Command Prompt (
cmd.exe)
This project is licensed under the MIT License – feel free to use, modify, and share.