Add batch scripts for getting file checksum

This commit is contained in:
Michael Campagnaro 2023-10-25 12:26:12 -04:00
parent 6889755330
commit b399a9e2c9
4 changed files with 44 additions and 0 deletions

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)

View File

@ -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"
)