Extended README.md and removed unwanted output

This commit is contained in:
ByteDream 2021-05-24 23:47:16 +02:00
parent a22bdf470c
commit 67207b367d
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,7 @@
## Hashify Filename ## Hashify Filename
With this little script you can rename given files to its [MD5](https://en.wikipedia.org/wiki/MD5) hashsum. File extension won't be changed. This little script renames given files to its [MD5](https://en.wikipedia.org/wiki/MD5) hashsum. File extension won't be changed.
This allows duplicate files in the same directory to be easily detected and merged / overwritten.
This script is just a fork of [randomize-filename](../randomize-filename). This script is just a fork of [randomize-filename](../randomize-filename).

View File

@ -38,7 +38,9 @@ function rename() {
continue continue
fi fi
filename="$(md5sum $filepath | awk '{print $1}')$ext" filename="$(md5sum $filepath | awk '{print $1}')$ext"
mv "$filepath" "$base/$filename" if [ $file != $filename ]; then
mv -f "$filepath" "$base/$filename"
fi
done done
} }