本帖最后由 temp 于 2011-5-19 12:32 编辑
搜索命令:- @echo off&setlocal enabledelayedexpansion
- title= 查找包含.dll .ax字符行
- for /f "delims=" %%i in ('dir/b/s/a-d "%~dp0Bin\*.dll"') do echo %%i>>a.txt
- for /f "delims=" %%i in ('type "a.txt"') do (if not defined %%i set %%i=A & echo Regsvr32/s "%%i">>"1.cmd")
复制代码 结果:- Regsvr32/s "D:\Documents and Settings\Administrator\桌面\Tencent\QQ\Bin\AddrSearch.dll"
- Regsvr32/s "D:\Documents and Settings\Administrator\桌面\Tencent\QQ\Bin\AFCtrl.dll"
- Regsvr32/s "D:\Documents and Settings\Administrator\桌面\Tencent\QQ\Bin\AFUtil.dll"
- Regsvr32/s "D:\Documents and Settings\Administrator\桌面\Tencent\QQ\Bin\AppCom.dll"
- Regsvr32/s "D:\Documents and Settings\Administrator\桌面\Tencent\QQ\Bin\AppFramework.dll"
- Regsvr32/s "D:\Documents and Settings\Administrator\桌面\Tencent\QQ\Bin\AppMisc.dll"
- Regsvr32/s "D:\Documents and Settings\Administrator\桌面\Tencent\QQ\Bin\AppUtil.dll"
- Regsvr32/s "D:\Documents and Settings\Administrator\桌面\Tencent\QQ\Bin\AuCommon.dll"
- Regsvr32/s "D:\Documents and Settings\Administrator\桌面\Tencent\QQ\Bin\audioengine.dll"
- ... ...
复制代码 我希望得到的结果:- Regsvr32/s "Bin\XVEngine.dll"
- Regsvr32/s "Bin\AddrSearch.dll"
- Regsvr32/s "Bin\AFCtrl.dll"
- Regsvr32/s "Bin\AFUtil.dll"
- Regsvr32/s "Bin\AppCom.dll"
- Regsvr32/s "Bin\AppFramework.dll"
- Regsvr32/s "Bin\AppMisc.dll"
- Regsvr32/s "Bin\AppUtil.dll"
- ... ...
复制代码 谢谢! |