@echo off
(for /f "delims=" %%a in (文件名) do (
set "str=%%a"
setlocal enabledelayedexpansion
set "str=!str:老字符串=新字符串!"
echo,!str!
endlocal
))>"setup.tmp"
move /y "tmp.tmp" "文件名"
bat修改文件内容
最新推荐文章于 2023-08-24 16:57:07 发布
@echo off
(for /f "delims=" %%a in (文件名) do (
set "str=%%a"
setlocal enabledelayedexpansion
set "str=!str:老字符串=新字符串!"
echo,!str!
endlocal
))>"setup.tmp"
move /y "tmp.tmp" "文件名"