A simple Go tool to scan a directory for duplicate files (based on size and MD5 hash) and move them to a separate directory.
You can download the latest release from the Releases page.
Or install with Go:
go install github.com/arran4/move-dups-script/cmd/movedups@latestmovedups -src <source_directory> -dest <destination_directory>-src: Source directory to scan for duplicates. Defaults to.(current directory).-dest: Destination directory to move duplicates to. Defaults todups.
Scan the current directory and move duplicates to dups:
movedupsScan the photos directory and move duplicates to duplicates:
movedups -src ./photos -dest ./duplicates- Scans the source directory for files.
- Calculates the MD5 hash of each file (including size in the hash key).
- Keeps track of seen hashes.
- If a file's hash has been seen before, it moves the file to the destination directory.
- If the destination directory does not exist, it is created.
- Go 1.22 or later
go test ./...