
CODE: [Copy to clipboard][ Last edited by zw19750516 on 2008-5-30 at 04:46 PM ]@echo off
echo abcd>a.txt&echo 1234>b.txt
echo find "abcd" a.txt
find "abcd" a.txt>nul
echo errorlevel:%errorlevel%
echo.
echo find "abcd" b.txt
find "abcd" b.txt>nul
echo errorlevel:%errorlevel%
pause>nul&del /q a.txt b.txt
| Quote: | |
|
CODE: [Copy to clipboard]@echo off
set /p password=请输入密码:
echo %password%|findstr "1234">nul
if errorlevel 1 (echo 密码错误!) else (echo 密码正确!)
pause>nul
CODE: [Copy to clipboard]@echo off
set /p password=请输入密码:
echo %password%|findstr /ix "1234">nul
if errorlevel 1 (echo 密码错误!) else (echo 密码正确!)
pause>nul
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |