DEV Community

Sivaprasad Murali
Sivaprasad Murali

Posted on

Meet Fylex: The Smartest File Copy Tool You've Never Used (Yet)

✨ "What if cp could think?"

🧠 That’s the question that led to Fylex — a fast, filterable, fault-tolerant file copier built for developers who want more than just shutil.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
Enter fullscreen mode Exit fullscreen mode

⚙️ How to Use It (Simple Example)

fylex --src myfiles --dest backup --match-glob "*.txt" --on-conflict rename
Enter fullscreen mode Exit fullscreen mode

🔁 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
Enter fullscreen mode Exit fullscreen mode

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

📍 PyPI
📁 GitHub

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 cp after this.


Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.