Β
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.