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)