Shout out to THIS PERSON for dropping a workable command template
This is not written using best practice, hacked it together to make it work.
- Needs exiftool installed and in your path unless you change it
- Context item will output the file to same dir as
sha256hash.[orig ext]
- Note: cmd dumps the %1 param as a codeblock into powershell
- Exiftool fails quiet so if it doesn't work, edit the flags on exiftool
$fp
is filepath passed from explorer in from cmd
$h
is the hash
$ee
is file ext
To implement:
- Create new reg entry under
HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell
- Edit value of the key to be the name of what you want the context menu item to be
- Create a new
command
entry under that ex:HKEY_CLASSES_ROOT\SystemFileAssociations\image\shell\ExifRemoval\command
- Copy/paste below into the value of that
That's it, hope it helps someone!
cmd.exe /c powershell.exe "&{param ($I = {%1}) ;$fp = $I.ToString();get-filehash $fp | Select-Object -expandProperty Hash -outvariable h;$ee = $fp.ToString().split('.')[-1];Remove-Item -force $h'.'$ee -ErrorAction Ignore;ExifTool.exe `-all= `-m `-q `-q `-o $h'.'$ee $fp}"