title: How to pass arguments to WSL from a command prompt Batch File?
body: <p>I am trying to make a Batch file that does the following:</p>
  
  <ol>
  <li>cd to a specific directory in my computer.</li>
  <li>Enter WSL Ubuntu.</li>
  <li>Run a binary file with some arguments.</li>
  <li>Close the command prompt terminal.</li>
  </ol>
  
  <p>Ive written a little test batch file. It tries to do the specified actions. The only problem is that once it opens the bash terminal (in the same window) it won't perform the next line until I MANUALLY 'exit' out of WSL and then will try to run the './PESQ' line erroneusly (as it should be). </p>
  
  <pre><code>cd C:/users/jesus/desktop/source/audio
  ::desired path
  bash
  ::this opens up an ubuntu terminal like session inside CMD
  ./PESQ
  ::this is the compiled file, besides, there are more arguments that need to be in that line, (+16000 speech.wav speech_bab_0dB.wav)
  pause
  </code></pre>
  
  <p>When running the code I get the following output</p>
  
  <p><code>C:\Users\jesus\Desktop\source\audio&gt;bash
  jesusb@LAPTOP-08IGLCO1:/mnt/c/Users/jesus/Desktop/source/audio$</code></p>
  
  <p>Once I type <code>exit</code> I get the following output</p>
  
  <pre><code>C:\Users\jesus\Desktop\source\audio&gt;./PESQ
  '.' is not recognized as an internal or external command, operable program or batch file.
  
  C:\Users\jesus\Desktop\source\audio&gt;pause
  Press any key to continue . . .`
  </code></pre>
  
  <p>How can I give the <code>./PESQ +16000 speech.wav speech_bab_0dB.wav</code> command to the bash terminal?</p>