How to get Python location using Windows batch file?
<p>I need to create a windows batch script which creates and moves one specific file to <code>PYTHONPATH\Lib\distutils</code> folder.</p>

<p>Here is what I am attempting to do:</p>

<pre><code>ECHO [build] &gt;&gt; distutils.cfg
ECHO compiler=mingw32 &gt;&gt; distutils.cfg
MOVE distutils.cfg PYTHONPATH\Lib\distutils
</code></pre>

<p>However, <code>PYTHONPATH</code> does not exist but I know that Python location is set in <code>PATH</code> which I can check.
How can I parse <code>PATH</code> and extract Python location from it?</p>