Find XP Computers on a network with Batch file

Posted on 2014-07-17
Last Modified: 2014-08-08
Hello experts,

I am trying to write a batch file and use nmap.exe to find XP machines on the network. The batch file executes:

(I downloaded zenmap)

C:\program files\nmap.exe -F -O > XPList.txt

Sample export is:

Nmap scan report for (
Host is up (0.00076s latency).
All 100 scanned ports on  ( are filtered
Warning: OSScan results may be unreliable because we could not find at least 1 o
pen and 1 closed port
Device type: general purpose
Running: Microsoft Windows 2000
OS CPE: cpe:/o:microsoft:windows_2000::sp4
OS details: Microsoft Windows 2000 SP4

OS detection performed. Please report any incorrect results at .

How can I loop in all the text and echo out all the XP machines? (Windows 2000)

Is there a better way to do this?
Question by:zequestioner
    LVL 1

    Author Comment


    Per the above website i can use this:

    #17: How do I detect remote operating system?

    You can identify a remote host apps and OS using the -O option:

    nmap -O
    nmap -O  --osscan-guess
    nmap -v -O --osscan-guess

    Is there a better way to do this and have the script output a nice list?
    LVL 65

    Accepted Solution


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
    This article will show, step by step, how to integrate R code into a R Sweave document
    Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now