@ECHO OFF
SET abet=abcdefghijklmnopqrstuvwxyz!@#-/\ .0123456789
SET cipher1=8p#j4 9z\6w.ae@0u2r5o!xk-cf1b3g7hmqil/sntdvy
(
FOR /f "delims=" %%a IN (q20794050.txt) DO (
SET line=%%a
CALL :encipher
)
)>q20794050.txt.1
(
FOR /f "delims=" %%a IN (q20794050.txt.1) DO (
SET line=%%a
CALL :decipher
)
)>q20794050.txt.2
GOTO :EOF
:decipher
SET morf=%abet%
SET from=%cipher1%
GOTO trans
:encipher
SET from=%abet%
SET morf=%cipher1%
:trans
SET "enil="
:transl
SET $1=%from%
SET $2=%morf%
:transc
IF /i "%line:~0,1%"=="%$1:~0,1%" SET enil=%enil%%$2:~0,1%&GOTO transnc
SET $1=%$1:~1%
SET $2=%$2:~1%
IF DEFINED $2 GOTO transc
:: No translation - keep
SET enil=%enil%%line:~0,1%
:transnc
SET line=%line:~1%
IF DEFINED line GOTO transl
ECHO %enil%
GOTO :eof
Here you can do it with simple Chesar code (lookup).
abet (, ) , . , cipher1 - , abet cipher1.
, , abet, .
q20794050.txt:
The quick brown fox [jumps] {over} the lazy dog 9876543210.
9876543210 The quick brown fox !@
q20794050.txt.1:
5z4huo\#whp2@xeh @kh[6oa0r]h{@!42}h5z4h.8c-hj@9hyvdtns/liqm
yvdtns/liqh5z4huo\#whp2@xeh @khf1b3g7h6oa0rh@!42h5z4h.8c-hj@9m
( , Space)
q20794050.txt.2
: , % & | > <
, . /i IF, , abet cipher1 .
,
(for...do (...))>somefilename
somefilename, ECHO ed - ECHO .