@echo off setlocal :: Ask for the shift value set /p shift="Enter the shift value: " :: Ask for the group size set /p gsize="Enter the number group size: " :: MULTI-LINE INPUT NOT SUPPORTED BY BATCH :: :: Ask for the line size :: set /p lsize="Enter the number of groups per line: " :: Ask whether to repeat number groups set /p repeat="Do you want to repeat number groups (y/N)? " :: Ask for the message input echo. echo Enter the message to encode and process: set /p input= :: Pipe the input into nsencode.exe with the shift value, then pipe nsencode.exe's output into numberstation.exe :: Check user input and apply the -r flag if necessary if /i "%repeat%"=="y" ( echo Repeating number groups with the -r flag. echo %input% | nsencode.exe -s %shift% -g %gsize% | numberstation.exe -r ) else ( echo Not repeating number groups. echo %input% | nsencode.exe -s %shift% -g %gsize% | numberstation.exe ) :: Pause before exit pause endlocal