β¨ "What if
cpcould think?"
π§ Thatβs the question that led to Fylex β a fast, filterable, fault-tolerant file copier built for developers who want more than justshutil.copy().
π Why I Built Fylex
As a Python developer, I often needed to move thousands of files across systems, sometimes skipping duplicates, filtering intelligently, or resolving name collisions. The options?
- Bash
cpβ fast, but dumb. -
shutil.copytree()β okay for basic use, but lacks conflict resolution or filtering. - Third-party tools β either bloated, GUI-only, or justβ¦ underwhelming.
So I built Fylex β a Python CLI tool that copies files smartly, using hashing, regex filtering, multi-threading, and intelligent conflict resolution.
π§© What Makes Fylex Special?
Hereβs what Fylex brings to the table:
| Feature | Why It Matters |
|---|---|
| β Hash-based comparison | No false duplicates. Truly content-aware. |
| π― Regex + glob filtering | Copy only what you need. Like a laser. |
| π§ Intelligent conflict handling | Rename, skip, replace (by size/date), or prompt |
| π¦ Interactive mode | Confirm every action, if you choose to |
| π Dry run | Preview changes without doing them |
| π§΅ Multi-threaded performance | Speeds up massive file transfers |
| π Verbose logging | Clear, timestamped logs. Debug with ease. |
| π Preserves metadata | Uses shutil.copy2() to keep timestamps, etc. |
π¦ Install in Seconds
pip install fylex
βοΈ How to Use It (Simple Example)
fylex --src myfiles --dest backup --match-glob "*.txt" --on-conflict rename
π This copies all .txt files to backup/, renaming any that conflict.
Filter via regex, run dry, avoid duplicates, and log everything:
fylex --src . --dest ../mirror --match-regex "^[a-z]+\.py$" --on-conflict skip --dry-run --verbose
π§ Why Itβs Smarter Than the Rest
Other tools blindly copy files or use modification timestamps at best. Fylex goes deeper β it hashes files using xxhash, compares content, skips what doesnβt need copying, and ensures the target is always correct.
π Oh β and it verifies every copy, retrying intelligently if a mismatch is detected.
βοΈ Whoβs It For?
- π§βπ» Developers moving large codebases or backups
- π¦ DevOps engineers syncing file structures
- π Data scientists wrangling massive datasets
- π§ͺ QA testers automating file-heavy environments
π What's Next?
Iβm planning:
- Recursive folder support
- Real-time progress bars
- Cloud sync extensions (S3, GDrive)
- GUI wrapper? Maybe...
π Try It, Break It, Love It
Give it a spin. Try it on your real data. Tell me what itβs missing.
If it made your life easier β star β the repo, and share your feedback.
π§ Fylex is open-source (MIT licensed), so fork it, extend it, or embed it. Just donβt go back to
cpafter this.
Top comments (0)