A utility for safely merging multiple folders while handling file conflicts
Project description
Folder Merger
A Python utility for safely merging multiple folders while handling file conflicts intelligently.
Features
- Recursively merges folders while preserving directory structure
- Detects and handles file conflicts automatically
- Skips duplicate files using MD5 hash comparison
- Progress tracking with tqdm
- Comprehensive logging
Installation
pip install folder-merger
Usage
Command Line Interface
folder-merger --source /path/to/source --destination /path/to/destination
Python API
from folder_merger import MergeManager
manager = MergeManager(
source_root="/path/to/source",
output_path="/path/to/destination"
)
manager.merge_all()
How it Works
- The tool recursively walks through the source directory
- For each file:
- Checks if file exists in destination
- If file exists, compares MD5 hashes to detect duplicates
- If files are different, creates a conflict copy with "_conflict" suffix
- If file doesn't exist, copies it to destination
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
folder_merger-0.1.0.tar.gz
(4.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file folder_merger-0.1.0.tar.gz.
File metadata
- Download URL: folder_merger-0.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac49b6374848f9a59b36b42229249e361537e3c56ab804843bc1b9fa74ce7805
|
|
| MD5 |
777c7a03fcdae8892994a5e4fa8138f3
|
|
| BLAKE2b-256 |
88f7d447d120d40f525d6e0834a3bab1816b9e23b5a9da3c0c6190d046f334a2
|
File details
Details for the file folder_merger-0.1.0-py3-none-any.whl.
File metadata
- Download URL: folder_merger-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68d3ebf5cb858e16ee5d032e17a4d1291000c5e2d35df89f316746ec2d8f7901
|
|
| MD5 |
68e75e2f4ce9a70c081e9aaf5349cfb3
|
|
| BLAKE2b-256 |
a874f3e1c5fb4138ad2d510f5a56f374d3cbe2b8e9aebcdf0ee471e95f02c10f
|