Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 439 Posts 170 Joined 2006-01-09 20:29 20-year member UID 48707
Status Offline
for /f "usebackq tokens=3 delims= " %%i in (`netsh interface show interface^|find "专用"`) do (
set a=%%i
if #%%i neq #本地连接 netsh interface set interface name=%%i newname=本地连接
)
pause
Rename the local connection
[ Last edited by a9319751 on 2006-12-12 at 06:58 AM ]
Credits 11,386 Posts 4,938 Joined 2006-07-23 17:10 20-year member UID 59080
Status Offline
The set a=%%i here seems a bit redundant, and so is delims=.
Modify it:
@echo off&&for /f "tokens=3" %%i in ('netsh interface show interface^|find "专用"') do if #%%i neq #本地连接 netsh interface set interface name=%%i newname=本地连接
Recent Ratings for This Post
( 1 in total)Click for details