title: Get full path to .exe file if only a subfolder path to it is given
body: <p>I have to find the <code>rscript.exe</code> that exists in a folder called bin but I do not have the full reference to this folder.</p>
  
  <p>Full Reference would be:</p>
  
  <pre><code>C:\Program Files\R\R-3.5.3\bin
  </code></pre>
  
  <p>but I do not know the version part beforehand. So I must go to</p>
  
  <p><code>C:\Program Files\R</code> and search the subfolders for the <code>rscript.exe</code> and recieve the full path to it. </p>
  
  <p>I have already searched but all I could find was how to find out the path of the <a href="https://stackoverflow.com/questions/2593458/executable-directory-where-application-is-running-from">running application via reflections</a> and tried out to rewrite the code without any solution. Could anyone help me here?</p>