title: Putty - Delete files dynamically using C#
body: <p>I am working on a Windows app with C# as a programming langugage.</p>
  
  <p>Requirement is</p>
  
  <ol>
  <li>to login to putty dynamically</li>
  <li>delete old files from specific location</li>
  </ol>
  
  <p>I am currently using below code to login to putty, but how do i ran the delete command ??</p>
  
  <pre><code>string hostname = "hostname";
  string login = "login";
  string password = "password";
  ProcessStartInfo startInfo = new ProcessStartInfo();
  startInfo.FileName = @"C:\Putty\putty.exe";
  startInfo.Arguments = string.Format("{0}@{1} -pw {2}", login, hostname, password);
  startInfo.Start();
  </code></pre>
  
  <p>I want to pass something like this </p>
  
  <pre><code>rm myFile*.txt
  </code></pre>
  
  <p>But before that I have to navigate to particular location by</p>
  
  <pre><code>cd /dir1/dir2/NewFolder
  </code></pre>
  
  <p>I wanted to delete all the <code>.txt</code> files under NewFolder??</p>