本帖最后由 batman 于 2011-4-24 23:13 编辑
- @echo off
- call :get_tab tab
- for /f "skip=1 tokens=1-6 delims=%tab%" %%1 in (练习文档.txt) do (
- set ".%%1=%%3"&set "_%%1=计算机名为tab:"%%3" 工作组名为tab:"%%4" IP地址为tab:"%%5" 网格权限为tab:"%%6""
- set /a num=%%1
- )
- :again
- setlocal enabledelayedexpansion
- cls&echo,&echo,
- for /l %%a in (1,1,%num%) do (
- set/p=^(%%a^)%tab%!.%%a!%tab%<nul&set /a n=%%a%%3
- if !n! equ 0 echo,
- )
- echo,&echo,&set /p select=请输入要调取信息的主机序号(可选择多项但请用空格格开):
- for %%a in (%select%) do (
- cls&echo,&echo,
- for %%a in (!_%%a!) do (
- set "str=%%a"&set "str=!str:tab:"=%tab%:!"
- echo !str:~,-1!&echo,
- )
- pause
- )
- cls,&echo,&echo,
- echo %tab%^(1^)%tab%再次调取%tab%^(2^)%tab%退出
- set /p select1=%tab%
- if "%select1%" equ "1" endlocal&goto again
- goto :eof
- %------------------制表符获取函数------------------%
- :get_tab
- for /f "skip=39 delims=T" %%a in (%windir%\system32\MsDtc\Trace\msdtcvtr.bat) do if not defined tab set "%1=%%a"
- call,set "%1=%%%1:~,-1%%"
- %------------------制表符获取函数------------------%
复制代码
|