<?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 Re: two instructions within a FOR in Operating System - Microsoft</title>
    <link>https://community.hpe.com/t5/operating-system-microsoft/two-instructions-within-a-for/m-p/3957206#M7876</link>
    <description>Tnks.&lt;BR /&gt;It did the trick.&lt;BR /&gt;&lt;BR /&gt;Edgar.</description>
    <pubDate>Thu, 08 Mar 2007 02:29:20 GMT</pubDate>
    <dc:creator>Edgar Zapata</dc:creator>
    <dc:date>2007-03-08T02:29:20Z</dc:date>
    <item>
      <title>two instructions within a FOR</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/two-instructions-within-a-for/m-p/3957204#M7874</link>
      <description>I'm intereseted in determining if a list of some 300 servers are being rebooted on a weekly basis and when.&lt;BR /&gt;&lt;BR /&gt;For that purpose, I am running the srvinfo within a FOR.&lt;BR /&gt;&lt;BR /&gt;for /F %%a in (ServerList.txt) do srvinfo \\%%a &amp;gt;&amp;gt; outputFile.csv&lt;BR /&gt;&lt;BR /&gt;After that, I perform the following:&lt;BR /&gt;findstr /C:"System Up Time" outputFile.csv &amp;gt;&amp;gt; rebootingTime.csv&lt;BR /&gt;&lt;BR /&gt;This way, I get the following output line only:&lt;BR /&gt;System Up Time: 12 Days, 2 Hr, 50 Min,  7 Sec&lt;BR /&gt;&lt;BR /&gt;The thing is there are some servers that cannot be contacted so I don't know which server is which.&lt;BR /&gt;&lt;BR /&gt;What I need is having the servername in the outputfile as well.&lt;BR /&gt;&lt;BR /&gt;I think it should be something like this (using the pipe |):&lt;BR /&gt;&lt;BR /&gt;for /F %%a in (serverlist.txt) do echo %%a &amp;gt;&amp;gt; outputfile.csv | srvinfo \\%%a &amp;gt;&amp;gt; outputfile.csv &lt;BR /&gt;&lt;BR /&gt;But this doesn't work.&lt;BR /&gt;&lt;BR /&gt;Tnks.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Mar 2007 04:47:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/two-instructions-within-a-for/m-p/3957204#M7874</guid>
      <dc:creator>Edgar Zapata</dc:creator>
      <dc:date>2007-03-07T04:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: two instructions within a FOR</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/two-instructions-within-a-for/m-p/3957205#M7875</link>
      <description>You "should" be able to do the following:&lt;BR /&gt;&lt;BR /&gt;for /F %%a in (serverlist.txt) do (&lt;BR /&gt;  echo %%a &amp;gt;&amp;gt; outputfile.csv &lt;BR /&gt;  srvinfo \\%%a &amp;gt;&amp;gt; outputfile.csv&lt;BR /&gt;)&lt;BR /&gt;&lt;BR /&gt;Jon</description>
      <pubDate>Wed, 07 Mar 2007 17:06:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/two-instructions-within-a-for/m-p/3957205#M7875</guid>
      <dc:creator>Jon Finley</dc:creator>
      <dc:date>2007-03-07T17:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: two instructions within a FOR</title>
      <link>https://community.hpe.com/t5/operating-system-microsoft/two-instructions-within-a-for/m-p/3957206#M7876</link>
      <description>Tnks.&lt;BR /&gt;It did the trick.&lt;BR /&gt;&lt;BR /&gt;Edgar.</description>
      <pubDate>Thu, 08 Mar 2007 02:29:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-microsoft/two-instructions-within-a-for/m-p/3957206#M7876</guid>
      <dc:creator>Edgar Zapata</dc:creator>
      <dc:date>2007-03-08T02:29:20Z</dc:date>
    </item>
  </channel>
</rss>

