<?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: Batch File run from Python Script or Translate to python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/batch-file-run-from-python-script-or-translate-to/m-p/638434#M49789</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That should work, I run a script similar to that, just switch your slashes around:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;os.system("S:/1GIS/Batchfiles/Kill_Engineers.bat")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Feb 2011 12:45:38 GMT</pubDate>
    <dc:creator>RDHarles</dc:creator>
    <dc:date>2011-02-02T12:45:38Z</dc:date>
    <item>
      <title>Batch File run from Python Script or Translate to python</title>
      <link>https://community.esri.com/t5/python-questions/batch-file-run-from-python-script-or-translate-to/m-p/638433#M49788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to run a batchfile that kills 1 of our SDE servers from a python script (or even better translated into python and run as part of the script).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried this in my script to run the batchfile:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
import os
os.system("S:\1GIS\Batchfiles\Kill_Engineers.bat")
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This doesn't appear to do anything. The batchfile requires a password to be entered. The batchfile has the followingh line of code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
sdemon -o kill -t all -s roc-a-a07 -i 5151
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I could do this from inside the python script it would be awesome. Any tips?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Geezer&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 00:27:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-file-run-from-python-script-or-translate-to/m-p/638433#M49788</guid>
      <dc:creator>JoshMoloney</dc:creator>
      <dc:date>2011-02-02T00:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Batch File run from Python Script or Translate to python</title>
      <link>https://community.esri.com/t5/python-questions/batch-file-run-from-python-script-or-translate-to/m-p/638434#M49789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That should work, I run a script similar to that, just switch your slashes around:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;os.system("S:/1GIS/Batchfiles/Kill_Engineers.bat")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 12:45:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/batch-file-run-from-python-script-or-translate-to/m-p/638434#M49789</guid>
      <dc:creator>RDHarles</dc:creator>
      <dc:date>2011-02-02T12:45:38Z</dc:date>
    </item>
  </channel>
</rss>

