title: child.bat not recognized as an internal or external command, operable program or batch file
body: <p>I have been going through a bat file issue.</p>
  
  <p>I'm calling one bat file in main bat file. The two bat files are in same folder i.e. "D:\" </p>
  
  <p>Test.bat:</p>
  
  <pre><code>SET str=HELLO
  ECHO say %str% Test
  Call Child.bat
  </code></pre>
  
  <p>Child.bat:</p>
  
  <pre><code>ECHO say %str% child 
  </code></pre>
  
  <p>In <code>Test.bat</code> file I have declared a variable <code>str</code> and using it in child bat file also. When I'm running Test.bat directly by double clicking it is working as expected and I will get result </p>
  
  <pre><code>say HELLO Test
  say HELLO Child
  </code></pre>
  
  <p>But the problem is here, if i'm running the Test.bat file from another machine in command prompt as </p>
  
  <ul>
  <li>Open run </li>
  <li>enter //Server/D$/Test.bat</li>
  </ul>
  
  <p>it is executing only Test.bat and fails to invoke Child.bat as I get output like </p>
  
  <pre><code>say HELLO Test
  Child.bat not recognized as an internal or external command, operable program or batch file
  </code></pre>
  
  <p>and on the above of command prompt I can see one statement like</p>
  
  <pre><code>'\\Server\D$\' CMD.EXE was started with the above path as the current directory. UNC paths are not supported.  Defaulting to Windows directory.
  </code></pre>
  
  <p>Actually I need to set up a sql job to invoke the Test.bat file.</p>
  
  <p>How do I resolve the issue?</p>