Win all view scripts for LAN IP

Source: Internet
Author: User


Copy the following into a batch document that ends in bat and save

Convenient and practical


----------------------------------------------------------------------------------------

COLOR 0A

Cls

@ECHO OFF


Title Small FAI-hui query LAN online computer IP

: Send

@ECHO off&setlocal enabledelayedexpansion

ECHO small FAI LAN viewing tool

Ping 127.0.0.1>>/null

ECHO is getting the IP address of this machine, please wait a moment ...

for/f "tokens=3 skip=2 delims=:"%%i in (' Nbtstat-n ') do (

Set "Ip=%%i"

Set ip=! ip:~1,-1!

The ECHO native IP is:! Ip! You know

Goto:next

)

: Next

For/f "delims=. tokens=1,2,3,4 "%%i in ("%ip% ") do set Range=%%i.%%j.%%k

Echo.&echo is getting the other online computer name in this network section, please wait ...

The computers in the ECHO network segment "%range%.*" are:

for/f "delims="%%i in (' net View ') does (

Set "Var=%%i"

:: Query Online computer name

If "!var:~0,2!" =="\\" (

Set "var=!var:~2!"

ECHO!var!

Ping-n 1!var!>nul

))

ECHO.

ECHO is acquiring other online computer IPs in this network segment, please wait a moment ...

for/f "skip=3 tokens=1,* delims="%%i in (' Arp-a ') does ECHO IP:%%i in use

ECHO.

ECHO Query finished, press any key to exit ...

Pause>nul

-------------------------------------------------------------------------------------------


Copy the above into a batch document that ends in bat and save


This article originated from: http://sunjiehui.blog.51cto.com/

For more information, expect


This article is from the "Sun Jie" blog, make sure to keep this source http://sunjiehui.blog.51cto.com/10597502/1682763

Win all view scripts for LAN IP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.