Stop writing Python boilerplate. Start automating.
DoScript is a dead-simple scripting language for everyday file automation. If you can write plain English, you can automate your computer.
do organize-downloads.doThat's it. No imports, no classes, no boilerplate.
Before: You write 30 lines of Python just to organize files by type.
After: You write this:
# organize-downloads.do
for_each file_in here
if file_ext == ".pdf"
move file to "Documents/PDFs/{file_name}"
end_if
if file_ext == ".jpg" or file_ext == ".png"
move file to "Pictures/{year}/{month}/{file_name}"
end_if
end_for
say "β Downloads organized!"Run it: do organize-downloads.do
- Download the installer (One-click setup)
- Open Command Prompt anywhere
- Create your first script:
echo say "Hello World!" > hello.do
do hello.dogit clone https://github.com/TheServer-lab/DoScript.git
cd DoScript
python doscript.py examples/hello_world.doRequirements: Python 3.8+
# organize-downloads.do
for_each file_in here
if file_ext == ".pdf"
move file to "Documents/{file_name}"
end_if
if file_ext == ".jpg" or file_ext == ".png"
move file to "Pictures/{file_name}"
end_if
if file_ext == ".zip"
move file to "Archives/{file_name}"
end_if
end_for# clean-old-files.do
for_each file_in deep
if file_is_old_days > 30
say "Deleting: {file_name} ({file_is_old_days} days old)"
delete file_path
end_if
end_for# backup-photos.do
for_each file_in deep
if file_ext == ".jpg" or file_ext == ".png"
copy file to "D:\Backup\{year}\{month}\{file_name}"
say "Backed up: {file_name}"
end_if
end_for# find-large-files.do
for_each file_in deep
if file_size_mb > 50
say "{file_name}: {file_size_mb}MB at {file_path}"
end_if
end_for# rename-screenshots.do
global_variable = counter
counter = 1
for_each file_in here
if file_name starts_with "Screenshot"
move file to "screenshot_{counter}{file_ext}"
counter = counter + 1
end_if
end_forπ See 20+ more examples β
# Test before running for real
do cleanup.do --dry-run
# See what's happening
do backup.do --verbosesay "Backup created on {today} at {now}"
# Output: Backup created on 2024-02-08 at 14:30:45
make folder "Backups/{year}/{month}/{day}"
# Creates: Backups/2024/02/08Available: {time}, {today}, {now}, {year}, {month}, {day}, {hour}, {minute}, {second}
Inside for_each loops, you get instant access to:
for_each file_in deep
say "{file_name}" # filename.txt
say "{file_path}" # C:\full\path\filename.txt
say "{file_ext}" # .txt
say "{file_size_mb}" # 2.5
say "{file_is_old_days}" # 45
say "{file_modified}" # Unix timestamp
end_forWrite once, run anywhere:
- β Windows (tested on 10/11)
- β macOS (10.15+)
- β Linux (Ubuntu, Debian, Arch, etc.)
- JSON/CSV support:
json_read,csv_read,json_get,csv_get - Archive handling:
zip,unzip,zip_list - Network operations:
download,upload,ping - Process control:
run,capture,kill - Error handling:
try/catchblocks - Functions & macros: Reusable code blocks
| Doc | Description |
|---|---|
| Quick Start Guide | Get running in 5 minutes |
| Language Reference | Complete command list |
| Examples Library | 20+ ready-to-use scripts |
| FAQ | Common questions |
- β Readable by non-programmers
- β Cross-platform (same script on Windows/Mac/Linux)
- β File operations are first-class citizens
- β
No boilerplate (
import os, shutil, glob...) - β Built for automation, not general programming
- β
Instant file metadata without
os.stat()
- β Modern syntax
- β Works on all platforms
- β Rich error handling
- β Simpler syntax
- β Faster to learn (5 min vs 5 hours)
- β No object pipeline confusion
DoScript is: "When Bash is too cryptic and Python is overkill"
Perfect for:
- π File organization & cleanup
- πΎ Backup automation
- π¦ Software deployment/installation
- π§Ή Scheduled maintenance tasks
- π Log file processing
- π Batch renaming & conversions
Not for:
- Web servers or APIs
- Complex data processing
- Real-time applications
- GPU-accelerated computing
One-click installer that:
- β
Adds
docommand to PATH - β
Sets up file associations (
.dofiles) - β Installs syntax highlighting (optional)
# Clone the repo
git clone https://github.com/TheServer-lab/DoScript.git
cd DoScript
# Run directly
python doscript.py your-script.do
# Or make it globally available
# Windows (PowerShell as Admin):
$env:PATH += ";$(pwd)"
# Linux/Mac:
sudo ln -s $(pwd)/doscript.py /usr/local/bin/do
chmod +x /usr/local/bin/do# Basic usage
do script.do
# With arguments (accessible as arg1, arg2, etc.)
do deploy.do production us-east-1
# Dry run (simulate without making changes)
do cleanup.do --dry-run
# Verbose output
do backup.do --verbose
# Combine flags
do deploy.do --dry-run --verbose staging- β¨ Time variables:
{today},{now},{year}, etc. - π JSON/CSV support: Read, write, and parse data files
- π¦ ZIP operations: Create and extract archives
- π Open links:
open_linkcommand - π Auto-update checker: Stay current automatically
- πͺ Windows shutdown: System power control
- π¬ Join Discord - Get help, share scripts
- π Report Issues - Found a bug?
- π‘ Request Features - Have an idea?
- π Read the Blog - Tutorials & tips
We'd love your help! Check out:
- Good First Issues - Easy starting points
- Contributing Guide - How to contribute
- Share Your Scripts - Show off what you've built!
Server-Lab Open-Control License (SOCL) 1.0
β Star this repo if DoScript saved you time!
It helps others discover the project and motivates continued development.
TheServer-lab - Building tools that make computing simpler.
DoScript: Because automation shouldn't require a CS degree.
Built with β€οΈ for people who just want to organize their files