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.