Here is an example of using the loop:
echo off
cls
:begin
set /P M=Input text to encode md5, press ENTER to exit:
if %M%==%M1% goto end
echo.|set /p ="%M%" | openssl md5
set M1=%M%
Goto begin
This is the simple batch i use when i need to encrypt any message into md5 hash on Windows(openssl required), and the program would loyally repeat itself except given Ctrl+C or empty input.