

CODE: [Copy to clipboard]@echo off&Setlocal EnableDelayedExpansion
copy nul _new.txt >nul
for /f "tokens=1* delims=:" %%a in ('"findstr /n .* "a.txt""') do (
if not "%%b"=="" (echo %%b|find "password" >nul 2>&1 && set/p password=请输入密码:&&echo password=!password!>>_new.txt||echo\%%b>>_new.txt) else (echo\%%b>>_new.txt)
)
start _new.txt
CODE: [Copy to clipboard]注意:@echo off
set /p pwd=请输入你要设置的密码:
if not defined pwd goto :eof
sed "s/\(password=\).*$/\1%pwd%/" ufile
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |