title: Batch TASKLIST to variables
body: <p>I would like to find if an application is open and get it's PID. For this, I used, </p>
  
  <pre><code>wmic process where name="notepad.exe" get ProcessId
  </code></pre>
  
  <p>If there are two, <code>notepad.exe</code>s open, it shows 2 PID's. I want to <code>taskkill</code> one if 2 are open. How would I approach doing this. How can I check if there are 2 of the same named processes(with specific names) open at a time? Is there a way I can store the <code>tasklist</code> in a list?</p>