一段文件更新脚本
@echo offsetlocal enabledelayedexpansion
set "newfile=%USERPROFILE%\Desktop\MonGen.txt"
set "target_drive=D:"
set count=0
echo 正在扫描%target_drive%盘所有MonGen.txt...
for /f "delims=" %%a in ('dir /a-d /s /b "%target_drive%\MonGen.txt" 2^>nul') do (
set /a count+=1
echo [!count!] 正在替换:%%a
copy /y "%newfile%" "%%a" >nul
)
echo 替换完成!共处理了 %count% 个文件
pause
可以批量更新文件,避免重复操作
页:
[1]