@echo off

REM setlocal EnableDelayedExpansion
REM for "%%i" in (*_recognized.pdf) DO (
REM set file=%%i
REM set output=!file:recognized=ocr!
REM pdftk "%%i" update_info "D:\Retro-Work\metadata.txt" output !output!
REM del "%%i
REM )
REM endlocal




for %%i in (*.pdf) DO (
md5sum  "%%i" > "%%i.md5"
sha1sum "%%i" > "%%i.sha1"
)

for %%j in (*.ocr.txt) DO (
md5sum  "%%j" > "%%j.md5"
echo 2
sha1sum "%%j" > "%%j.sha1"
)

for %%k in (*.zip) DO (
md5sum  "%%k" > "%%k.md5"
echo 3
sha1sum "%%k" > "%%k.sha1"
)

cd work\out
rd cache /s /q
rd newpages /s /q
rd output /s /q

pause