<?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: Execute command on files in a dir using bat script in Windows Server 2003</title>
    <link>https://community.hpe.com/t5/windows-server-2003/execute-command-on-files-in-a-dir-using-bat-script/m-p/3554044#M1963</link>
    <description>Thank you.&lt;BR /&gt;&lt;BR /&gt;I must have misused the term "scheme".&lt;BR /&gt;&lt;BR /&gt;Your answer is exactly what I had in mind.</description>
    <pubDate>Wed, 01 Jun 2005 20:57:00 GMT</pubDate>
    <dc:creator>Maxim Vexler</dc:creator>
    <dc:date>2005-06-01T20:57:00Z</dc:date>
    <item>
      <title>Execute command on files in a dir using bat script</title>
      <link>https://community.hpe.com/t5/windows-server-2003/execute-command-on-files-in-a-dir-using-bat-script/m-p/3554042#M1961</link>
      <description>For the following name scheme:&lt;BR /&gt;&lt;BR /&gt;access_log-w(WW)-(YYYY-MM-DD).log&lt;BR /&gt;&lt;BR /&gt;Where &lt;BR /&gt;WW = week (2 digits)&lt;BR /&gt;YYYY = year (4 digits)&lt;BR /&gt;MM = month (2 d)&lt;BR /&gt;DD = day (2 d)&lt;BR /&gt;&lt;BR /&gt;The script doesn't have to know what week it is, all it has to do is "dir" the directory, select the files that match this scheme and the execute a command with the file found (the log file as an argument.&lt;BR /&gt;&lt;BR /&gt;Any pointers (or the whole script for that matter) would be mostly appreciated.&lt;BR /&gt;&lt;BR /&gt;Thank you, &lt;BR /&gt;Maxim.</description>
      <pubDate>Mon, 30 May 2005 01:26:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/windows-server-2003/execute-command-on-files-in-a-dir-using-bat-script/m-p/3554042#M1961</guid>
      <dc:creator>Maxim Vexler</dc:creator>
      <dc:date>2005-05-30T01:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Execute command on files in a dir using bat script</title>
      <link>https://community.hpe.com/t5/windows-server-2003/execute-command-on-files-in-a-dir-using-bat-script/m-p/3554043#M1962</link>
      <description>Maxim,&lt;BR /&gt;&lt;BR /&gt;I'm not sure what you mean with "match the scheme", but might this be helpful?&lt;BR /&gt;&lt;BR /&gt;for /f %%a in (&lt;BR /&gt; 'dir /b "access_log-w(??)-(????-??-??).log"'&lt;BR /&gt; ) do (&lt;BR /&gt;  echo %%a&lt;BR /&gt;  )&lt;BR /&gt;&lt;BR /&gt;Just replace "echo" by your command.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Wijnand&lt;BR /&gt;</description>
      <pubDate>Tue, 31 May 2005 07:52:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/windows-server-2003/execute-command-on-files-in-a-dir-using-bat-script/m-p/3554043#M1962</guid>
      <dc:creator>Wijnand Lammens</dc:creator>
      <dc:date>2005-05-31T07:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: Execute command on files in a dir using bat script</title>
      <link>https://community.hpe.com/t5/windows-server-2003/execute-command-on-files-in-a-dir-using-bat-script/m-p/3554044#M1963</link>
      <description>Thank you.&lt;BR /&gt;&lt;BR /&gt;I must have misused the term "scheme".&lt;BR /&gt;&lt;BR /&gt;Your answer is exactly what I had in mind.</description>
      <pubDate>Wed, 01 Jun 2005 20:57:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/windows-server-2003/execute-command-on-files-in-a-dir-using-bat-script/m-p/3554044#M1963</guid>
      <dc:creator>Maxim Vexler</dc:creator>
      <dc:date>2005-06-01T20:57:00Z</dc:date>
    </item>
  </channel>
</rss>

