title: execute CMD command via VBA -shell
body: <p>Below is the example data availble in txt file</p>
  
  <p><a href="https://i.stack.imgur.com/suHzc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/suHzc.png" alt="enter image description here"></a></p>
  
  <p>I want to extract the data in another txt file which Sr no is 1.</p>
  
  <p>Please suggest me the VBA code which execute CMD command and bifurcate the data in another txt file.I have search the internet and got to know it is possible via use <strong>Shell("  ").</strong> help me to achieve my above object.</p>
  
  <p>My txt file(i.e. file3) is available in Z:\ drive.</p>
  
  <p>via below code i can open the cmd command window</p>
  
  <pre><code>Sub macro()
  Call Shell("cmd.exe", vbNormalFocus)
  End Sub
  </code></pre>