<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to collect all network Hostnames , IPs and MAC addresses inside text file using Batch scripting? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-collect-all-network-Hostnames-IPs-and-MAC-addresses/m-p/710368#M218659</link>
    <description>&lt;P&gt;Hi all I'm a beginner in batch scripting and I want to create a batch script to collect All needed data in one row for each workstation inside my domain into a text file using hostnames located in a text file named 'hosts.txt' by a batch scripting language&lt;BR /&gt;and here is my code below:&lt;/P&gt;&lt;PRE&gt;@echo off
echo All Information &amp;gt;"Hosts Info.txt"
echo. &amp;gt;&amp;gt;"Hosts Info.txt"
For /f %%d in (hosts.txt) do (
echo. %%d &amp;gt;&amp;gt;"Hosts Info.txt"
getmac /s %%d /v /nh &amp;gt;&amp;gt;"Hosts Info.txt"
ping %%d |find "Ping statistics for" &amp;gt;&amp;gt;"Hosts Info.txt"
echo._______________________________ &amp;gt;&amp;gt;"Hosts Info.txt"
)
pause
exit&lt;/PRE&gt;&lt;P&gt;but it's so dummy as I don't know but a few things about the batch programming, so I'm trying to do my best and I can't deal ever with many things like ( "tokens &amp;amp; delims" , " ~ " , " 1% " , " find "," findstr" ) What is these things means and how we use it to get just what I want only as I want the output look like that&lt;BR /&gt;1- [ Hostname : IP : MAC address ]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example for hosts.txt&lt;/P&gt;&lt;P&gt;host1&lt;/P&gt;&lt;P&gt;host2&lt;/P&gt;&lt;P&gt;host3&lt;/P&gt;&lt;P&gt;... etc.&lt;BR /&gt;could anyone help me, please.&lt;/P&gt;</description>
    <pubDate>Sat, 09 Jan 2021 11:33:21 GMT</pubDate>
    <dc:creator>Abo-Zead</dc:creator>
    <dc:date>2021-01-09T11:33:21Z</dc:date>
    <item>
      <title>How to collect all network Hostnames , IPs and MAC addresses inside text file using Batch scripting?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-collect-all-network-Hostnames-IPs-and-MAC-addresses/m-p/710368#M218659</link>
      <description>&lt;P&gt;Hi all I'm a beginner in batch scripting and I want to create a batch script to collect All needed data in one row for each workstation inside my domain into a text file using hostnames located in a text file named 'hosts.txt' by a batch scripting language&lt;BR /&gt;and here is my code below:&lt;/P&gt;&lt;PRE&gt;@echo off
echo All Information &amp;gt;"Hosts Info.txt"
echo. &amp;gt;&amp;gt;"Hosts Info.txt"
For /f %%d in (hosts.txt) do (
echo. %%d &amp;gt;&amp;gt;"Hosts Info.txt"
getmac /s %%d /v /nh &amp;gt;&amp;gt;"Hosts Info.txt"
ping %%d |find "Ping statistics for" &amp;gt;&amp;gt;"Hosts Info.txt"
echo._______________________________ &amp;gt;&amp;gt;"Hosts Info.txt"
)
pause
exit&lt;/PRE&gt;&lt;P&gt;but it's so dummy as I don't know but a few things about the batch programming, so I'm trying to do my best and I can't deal ever with many things like ( "tokens &amp;amp; delims" , " ~ " , " 1% " , " find "," findstr" ) What is these things means and how we use it to get just what I want only as I want the output look like that&lt;BR /&gt;1- [ Hostname : IP : MAC address ]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example for hosts.txt&lt;/P&gt;&lt;P&gt;host1&lt;/P&gt;&lt;P&gt;host2&lt;/P&gt;&lt;P&gt;host3&lt;/P&gt;&lt;P&gt;... etc.&lt;BR /&gt;could anyone help me, please.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2021 11:33:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-collect-all-network-Hostnames-IPs-and-MAC-addresses/m-p/710368#M218659</guid>
      <dc:creator>Abo-Zead</dc:creator>
      <dc:date>2021-01-09T11:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to collect all network Hostnames , IPs and MAC addresses inside text file using Batch script</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-collect-all-network-Hostnames-IPs-and-MAC-addresses/m-p/710404#M218684</link>
      <description>&lt;P&gt;Questions about Windows batch scripting would be better asked on a Microsoft Windows forum. The SAS Communities deals with SAS software.&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jan 2021 22:38:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-collect-all-network-Hostnames-IPs-and-MAC-addresses/m-p/710404#M218684</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-01-09T22:38:16Z</dc:date>
    </item>
  </channel>
</rss>

