title: How to call cmd batch from within powershell script
body: <p>I have</p>
  
  <p>C:\folder\tail.exe</p>
  
  <p>C:\logs\logfile.log</p>
  
  <p>C:\script\shellscript.ps1</p>
  
  <p>How do I run the C:\folder\tail.exe from within the C:\script\shellscript.ps1</p>
  
  <p>I need to run "C:\folder\tailf.exe C:\logs\logfile.log" from within C:\script\shellscript.ps1 but without relying a seperate batch file, i need to call it directly.</p>
  
  <p>Normally I do: cd C:\folder\ and then tailf.exe C:\logs\logfile.log</p>
  
  <p>Inside C:\script\shellscript.ps1 I tried</p>
  
  <pre><code>start-process C:\fetchmail\tail.exe -argumentlist "C:\fetchmail\logs\fetchmail.log"
  </code></pre>
  
  <p>i can see a window flashing but dont know if it works, the window should stay open.</p>