freps: the tool that wasn’t supposed to exist (but did)
It started with a very specific need: I needed a tool to rename files, search and replace text—fast and reliably—on Windows.
Nothing unusual. Until the context mattered.
A real project, a “clean” Windows machine, hundreds of files, inconsistent naming, and content that had to be updated. And absolutely no desire to install dependencies, set up environments, or write yet another one-off script “just for today”.
PowerShell was an option, sure—but too verbose for something that should take seconds. External tools were not always available (or allowed). Doing it manually was an open invitation to mistakes.
"I'll build a minimal tool that does exactly this... and that's it."
Spoiler: it’s never “and that’s it”.
What is freps?
freps is a lightweight Windows command-line utility, implemented as a single .bat file, designed to handle everyday file/folder operations:
- Rename files and directories
- Search text
- Replace content across files
- List by pattern
- Undo changes
- Delete files in a controlled way
No installers. No dependencies. Just drop it somewhere in your PATH and run it from a standard CMD.
The guiding rule is simple: if it doesn’t run on a fresh Windows machine, it doesn’t ship.
How it works
freps is mode-based: the first argument selects the operation, and the rest define what to match, what to change, and where to do it.
Key design points:
- Recursive directory processing
- Filtering by file extension
- Dry-run options (simulate before touching anything)
- Configurable verbosity
- Optional automatic backups when modifying content
This makes it useful both for quick explorations and for repeatable maintenance tasks.
Usage examples
Rename files and folders:
freps r oldName newName C:\\project
Replace text inside files (with backups):
freps p dev prod C:\\project .cfg .env /B /V
Search text inside files:
freps s ERROR "" C:\\logs .log .txt
Undo a previous replace using backups:
freps u C:\\project
TIP: Keep replacements safe: run a dry-run first, then enable backups when you apply changes.
How it's built
Yes—freps is written in Windows Batch. On purpose.
That choice comes with tradeoffs, and also with benefits:
- It relies on standard CMD primitives:
for,if,call, and delayed expansion. - It handles paths carefully (spaces and special characters included).
- It’s designed for pragmatic maintenance: clarity and portability over academic elegance.
Who it's for
freps is aimed at people who deal with real Windows project structures and file operations:
- Automation and controls engineers
- System technicians
- Developers working on Windows-only environments
- Anyone maintaining large projects with repetitive file edits
Especially useful when you can’t install extra software, need something quick and reproducible, or work in more “industrial” environments than typical dev workstations.
Wrap-up
freps is not trying to replace advanced tooling. It exists because it solves a very real problem in a simple, portable, predictable way.
It’s the kind of tool you don’t use every day… but when you need it, you’re very glad you have it.
Repo: github.com/EidoAut/freps