title: How to run command line from Delphi?
body: <p>How can I run this command from my Delphi application?</p>
  
  <blockquote>
    <p>C:\myapppath\appfolder>appname.exe /stext save.txt</p>
  </blockquote>
  
  <p>I tried the following code: </p>
  
  <pre><code>ShellExecute(0, nil, 'cmd.exe', 'cd C:\myapppath\appfolder', nil, SW_Hide);
  ShellExecute(0, nil, 'cmd.exe', 'appname.exe /stext save.txt', nil, SW_Hide);
  </code></pre>
  
  <p>But it didn't work. Can anyone provide a solution?</p>