โจ "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)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.