Verifying the hell out of
http://tasvideos.org/EmulatorResources/PCem/DOS/Configurations.html almost drove me crazy with how many md5 hashes I had to check. Even more to come now that we accept llibTAS+PCem submissions.
So I needed some incredibly quick way to know a hash of some file, or of all files in a folder. Drag'n'drop feels like the quickest way. Unfortunately, lubuntu doesn't let you drag'n'drop onto scripts, but you can make a script launch a terminal and repeatedly accept your drag'n'drops, printing stuff.
So here's a script that you usually run on Linux, because it's a Shell script. But if you are on Windows and you associate this file with your
mingw64.exe or whatever you're using, double-clicking on the script will launch you a nice md5-drag-n-drop terminal! Supports paths with spaces and nested folders.
Props to mjbudd77 and F. Hauri.
Download md5.shLanguage: shell
#!/bin/bash
echo -ne "\033]0;Drag & drop file or folder\007"
while IFS=$'\t\r\n' read -d '' -rsn 1 str && [ "$str" ]; do
while IFS= read -d '' -rsn 1 -t .02 char; do
str+="$char"
done
if [ "$str" ]; then
find "$str" -type f -exec md5sum {} \;
fi
done
Suggest improvements!