原帖由 2012luo 于 2012-7-15 09:56 发表
由于公司现在要大批量升级系统,基于某种原因,计算机名和IP都不能变。现在我已经拿到了要升级的电脑的MAC地址、IP地址和计算机名并按这个结构保存在1.txt文件中。每部分用一个空格分开。现在有一个问题。假设有 ...
390 Bytes, 下载次数: 27, 下载积分: 无忧币 -2
从文件中获取 MAC、IP、计算机名...
原帖由 <i>2012-Cool</i> 于 2012-7-15 22:36 发表 <a href="http://bbs.wuyou.net/redirect.php?goto=findpost&pid=2528795&ptid=254946" target="_blank"><img src="http://bbs.wuyou.net/images/common/back.gif" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {return true;} else {window.open(this.src);}" onmousewheel="return imgzoom(this);" alt="" /></a><br />
rem 核心部分<br />
for /f "tokens=1-3 delims= " %%i in ('type "1.txt" ^| findstr /i "00-01-02-03-04-05"') do (<br />
rem 将MAC地址赋值给变量MACAddress<br />
set MACAddress=%%i<br />
rem 将IP地址赋值给变量 ...
欢迎光临 无忧启动论坛 (http://bbs.wuyou.net/) | Powered by Discuz! X3.3 |