diff --git a/dotfiles/bin/file-checksum-md5.bat b/dotfiles/bin/file-checksum-md5.bat new file mode 100644 index 0000000..2c254dd --- /dev/null +++ b/dotfiles/bin/file-checksum-md5.bat @@ -0,0 +1,11 @@ +@echo off + +if exist %1\* ( + echo Run on a file +) else ( + if exist "%~1_checksum-md5.txt" ( + del "%~1_checksum-md5.txt" + ) + certutil.exe -hashfile "%~1" MD5 > "%~1_checksum-md5.txt" + start notepad "%~1_checksum-md5.txt" +) diff --git a/dotfiles/bin/file-checksum-sha1.bat b/dotfiles/bin/file-checksum-sha1.bat new file mode 100644 index 0000000..c548e5b --- /dev/null +++ b/dotfiles/bin/file-checksum-sha1.bat @@ -0,0 +1,11 @@ +@echo off + +if exist %1\* ( + echo Run on a file +) else ( + if exist "%~1_checksum-sha1.txt" ( + del "%~1_checksum-sha1.txt" + ) + certutil.exe -hashfile "%~1" SHA1 > "%~1_checksum-sha1.txt" + start notepad "%~1_checksum-sha1.txt" +) diff --git a/dotfiles/bin/file-checksum-sha256.bat b/dotfiles/bin/file-checksum-sha256.bat new file mode 100644 index 0000000..85ab0ae --- /dev/null +++ b/dotfiles/bin/file-checksum-sha256.bat @@ -0,0 +1,11 @@ +@echo off + +if exist %1\* ( + echo Run on a file +) else ( + if exist "%~1_checksum-sha256.txt" ( + del "%~1_checksum-sha256.txt" + ) + certutil.exe -hashfile "%~1" SHA256 > "%~1_checksum-sha256.txt" + start notepad "%~1_checksum-sha256.txt" +) diff --git a/dotfiles/bin/file-checksum-sha512.bat b/dotfiles/bin/file-checksum-sha512.bat new file mode 100644 index 0000000..1f38209 --- /dev/null +++ b/dotfiles/bin/file-checksum-sha512.bat @@ -0,0 +1,11 @@ +@echo off + +if exist %1\* ( + echo Run on a file +) else ( + if exist "%~1_checksum-sha512.txt" ( + del "%~1_checksum-sha512.txt" + ) + certutil.exe -hashfile "%~1" SHA512 > "%~1_checksum-sha512.txt" + start notepad "%~1_checksum-sha512.txt" +)