Tired of duplicate files cluttering up your disk space? DupMerge to the rescue! 🦸♂️ This powerful tool helps you manage duplicate files efficiently by creating or removing links to them. Customize how it handles duplicates with a variety of options, from creating symbolic or hard links to setting file size limits and managing read-only attributes.
- 🚀 Efficient File Handling: Quickly identifies duplicate files and creates links to them, saving valuable disk space.
- 🔧 Customizable Operations: Offers a range of options for creating symbolic links, deleting links, and even replacing links with file copies.
- 🔩 Flexible File Size Limits: Allows you to specify minimum and maximum file sizes for processing, so you only handle the files you want.
- ⚡ Multithreading Support: Utilizes multiple threads for faster file processing, automatically adjusting to your CPU cores for optimal performance.
- 🔒 Read-Only Attribute Management: Provides options to set or update the read-only attribute for linked files.
- 🔗 Versatile Linking Options: Enables the creation of both hard links and symbolic links, giving you flexibility in how you manage your files.
DupMerge is developed in C# and can be compiled using the .NET SDK. To get started, you'll need the .NET SDK installed on your machine.
# Clone the repository
git clone https://github.com/Hawkynt/DupMerge.git
# C--FrameworkExtensions is needed for building a monolithic executable.
# Clone it into a parallel directory named Framework.
git clone https://github.com/Hawkynt/C--FrameworkExtensions.git Framework
# Navigate to the project directory
cd DupMerge
# Build the project
dotnet buildThis will compile the application and place the executable in the bin/ directory.
DupMerge [<options>] [<directories>]-v,--info: Show information only, without making any changes.-t <n>,--threads <n>: Specify the number of threads to use for crawling. Defaults to the number of CPU cores (up to 8).-m <n>,--minimum <n>: Specify the minimum file size to process (default: 1).-M <n>,--maximum <n>: Specify the maximum file size to process.-s,--allow-symlink: Allow creating symbolic links if a hardlink cannot be created.-Dhl,--delete-hardlinks: Delete all hard links.-Dsl,--delete-symlinks,--delete-symboliclinks: Delete all symbolic links.-D,--delete: Same as-Dhl -Dsl.-Rhl,--remove-hardlinks: Remove hard links and replace them with a copy of the linked file.-Rsl,--remove-symlinks,--remove-symboliclinks: Remove symbolic links and replace them with a copy of the linked file.-R,--remove: Same as-Rhl -Rsl.-sro,--set-readonly: Set the read-only attribute on newly created sym/hard-links.-uro,--update-readonly: Set the read-only attribute to existing sym/hard-links.-ro,--readonly: Same as-sro -uro.
# Scan the current directory for duplicates and show info only
DupMerge --info .
# Create hardlinks for duplicates in multiple directories, using 4 threads
DupMerge.exe -t 4 C:\path\to\dir1 C:\path\to\dir2
# Delete all symbolic links in the specified directory
DupMerge.exe --delete-symlinks C:\path\to\dirWe welcome contributions to DupMerge! If you have a bug report, feature request, or a patch, please feel free to submit an issue or pull request on GitHub.
This project is licensed under the LGPL-3.0-or-later License - see the LICENSE file for details.