Add option to overwrite target files when their hash does not match the source
Pretty much what the header says: I would like the option to overwrite files in the destination when their hash does not match the source files'.
Pretty much what the header says: I would like the option to overwrite files in the destination when their hash does not match the source files'.
This feature is needed and (at least in theory) it would be fairly easy to implement.
There is currently no way to replace files whose actual contents differ from the source files.
Say you have files that were copied a long time ago and you want to make sure they aren't corrupted:
You want to replace the corrupted files as efficiently as possible.
You want to replace only the files that are different from the source files (not just based on name or datestamp, but by content)
The current options:
Overwrite all 1k files. (not at all efficient)
Skip all (doesn't do the job)
Overwrite all older (the source and target timestamps are identical, this doesn't do the job)
Replace all smaller (a corrupted file will have the same size, doesn't do the job)
Replace if size is different (a corrupted file will have the same size, doesn't do the job)
Rename all <x> (these would add files to the target, so it doesn't do the job)
The suggested option:
"Replace all files if hash differs"
- On filename collision, teracopy generates a hash for the source file and a hash for the colission file.
- If the hashes do not match, replace the collision file with the source file.