@ECHO OFF & SETLOCAL ENABLEDELAYEDEXPANSION
FOR /F %%A IN (A.TXT) DO (
SET str=%%A
ECHO !str:他娘的=TND!
)
FOR /F %%A IN (A.TXT) DO (
SET str=%%A
ECHO !str:他娘的=!
)
pause
for /f %%i in (test.txt) do (
set var=%%i
echo !var:%const_str:~1,-1%=TND!
)
echo.
echo ======分======割======线======
echo.
for /f %%i in (test.txt) do (
set var=%%i
echo !var:%const_str:~1,-1%=!
)
@echo off
setlocal EnableDelayedExpansion
for /f "delims=" %%a in (a.txt) do (
set file=%%a
set b=!file:他娘的=TND!
echo !b!>>b.txt
)
for /f "delims=" %%b in (b.txt) do (
set name=%%b
set c=!name:TND=!
echo !c!>>b.txt
)
pause
新手代码,但一定是我自己写的,求指教,谢谢!