@echo off
if %1X ==X goto FILE_MISSING
if %2X ==X goto KEY_MISSING

if exist %1/.zip remove %1/.zip

echo on
openssl.exe enc -d -aes-128-cbc -nosalt -pass pass:%2 -in %1 -out %1.zip
@echo off

if not exist %1.zip goto RESULT_ERROR
echo.
echo OK : result is %1.zip
%1.zip

goto :EOF

:FILE_MISSING
echo filename is missing
goto :EOF

:KEY_MISSING
echo key is missing, copy it from filename
goto :EOF

:RESULT_ERROR
echo *** Decrypt issue , file not created
goto :EOF
