i want this code to be able to encrypt the capital letters because when i add capital letters it will be encrypted like the small letters
encryption code
decryption code
You have to make a loop with an IF
test to check if the char is lower or upper case :
Example :
@echo off
::The string to Encrypt
set "$string=aBA baB"
setlocal enabledelayedexpansion
for /l %%i in (0,1,9000) do (
set char=!$string:~%%i,1!
if "!char!"==" " set char=#
if defined char (
REM here the tests and substitutions
if !char!==a set "char=!char:a=[aSmall]!"
if !char!==A set "char=!char:A=[ACapital]!"
if !char!==b set "char=!char:b=[bSmall]!"
if !char!==B set "char=!char:B=[BCapital]!"
set "$final=!$final!!char!"
)
)
echo %$String% --^> !$final:#= !