联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off set term=2 setlocal enabledelayedexpansion for /f "tokens=*" %%i in (all.txt) do ( if "!term!"=="1" echo file: !file! set term=1 for /f "tokens=*" %%c in (except.txt) do ( set file=%%i if "%%i"=="%%c" set term=2 ) ) if "!term!"=="1" echo file: !file! pause
@echo off for /f "delims=" %%i in ('findstr /v /g:except.txt all.txt') do echo "%%i" pause
Originally posted by namejm at 2006-10-11 12:05: 如果下面的代码能正确显示你想要的内容,请把echo语句改成xcopy语句: @echo off for /f "delims=" %%i in ('findstr /v /g:except.txt all.txt') do ech ...
@echo off for /f "delims=" %%i in ('findstr /v /g:except.txt all.txt') do ech ...
Originally posted by bapala at 2006-10-11 12:16: all.txt的最后一项会存在判断错误的危险,谢谢指导。