变换.bat:- @echo off
- set list=a b c d e f g h i j k l m n o p q r s t u v w x y z
- (for /f "delims=" %%a in (原文件.txt) do (
- set "text=%%a"
- setlocal enabledelayedexpansion
- for %%b in (%list%) do set text=!text:%%b=[%%b]!
- echo !text!
- endlocal
- ))>变换.txt
- pause
复制代码 还原.bat:- @echo off
- set list=a b c d e f g h i j k l m n o p q r s t u v w x y z
- (for /f "delims=" %%a in (变换.txt) do (
- set "text=%%a"
- setlocal enabledelayedexpansion
- for %%b in (%list%) do set text=!text:[%%b]=%%b!
- echo !text!
- endlocal
- ))>还原.txt
- pause
复制代码
|