<?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: Splunk ExecProcessor can't find .bat script in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-ExecProcessor-can-t-find-bat-script/m-p/650166#M110492</link>
    <description>&lt;P&gt;After few days of work, I figured out that the bat file literally could not find the file. Depending on who is running the bat file (SYSTEM in this case) it changed the environment variable and the folder did not exist.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jul 2023 12:14:31 GMT</pubDate>
    <dc:creator>Choi_Hyun</dc:creator>
    <dc:date>2023-07-12T12:14:31Z</dc:date>
    <item>
      <title>Splunk ExecProcessor can't find .bat script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-ExecProcessor-can-t-find-bat-script/m-p/649516#M110400</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a simple .bat file that just performs a "dir" command to list everything in a folder.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have set the input.conf to the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[script://.\bin\ListDir.bat]
disabled = 0
## Run Every Ten Seconds
interval = 10
sourcetype = Script:ListDir
index = main&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have placed my ListDir.bat in the application's \bin\ folder.&lt;BR /&gt;When I run the command: splunk cmd ListDir.bat, splunk runs the bat files no problem, displaying all the files I want Splunk to ingest.&lt;/P&gt;&lt;P&gt;However, looking at my Splunkd logs, I see that ExecProcessor lists the exact location where the bat file exists and reads "The system cannot find the file specified."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ERROR ExecProcessor [11384 ExecProcessor] - message from ""C:\Program Files\SplunkUniversalForwarder\etc\apps\Splunk_TA_Burn_Folder\bin\ListDir.bat"" The system cannot find the file specified.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I looked at the file permissions and I gave everyone access to this bat file.&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jul 2023 15:25:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-ExecProcessor-can-t-find-bat-script/m-p/649516#M110400</guid>
      <dc:creator>Choi_Hyun</dc:creator>
      <dc:date>2023-07-06T15:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk ExecProcessor can't find .bat script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-ExecProcessor-can-t-find-bat-script/m-p/650166#M110492</link>
      <description>&lt;P&gt;After few days of work, I figured out that the bat file literally could not find the file. Depending on who is running the bat file (SYSTEM in this case) it changed the environment variable and the folder did not exist.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 12:14:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-ExecProcessor-can-t-find-bat-script/m-p/650166#M110492</guid>
      <dc:creator>Choi_Hyun</dc:creator>
      <dc:date>2023-07-12T12:14:31Z</dc:date>
    </item>
  </channel>
</rss>

