Run command line

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • KH

    Run command line

    Isn't there a way to run a command-line string from .NET? Like:

    Shell.Execute( "del *.tmp" );

    Seems I remember one but can't find it right now. I thought it would be on
    the Environment class, then I checked Console and Application. Or am I
    smoking something? Anyone?

    TIA - Ken

  • Michael Nemtsev

    #2
    Re: Run command line

    Hello kh,

    // Start a Web page using a browser associated with .html and
    ..asp files.
    Process.Start(" IExplore.exe", "C:\\myPath\\my File.htm");

    k> Isn't there a way to run a command-line string from .NET? Like:
    k>
    k> Shell.Execute( "del *.tmp" );
    k>
    k> Seems I remember one but can't find it right now. I thought it would
    k> be on the Environment class, then I checked Console and Application.
    k> Or am I smoking something? Anyone?
    k>
    k> TIA - Ken
    k>
    ---
    WBR,
    Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour

    "At times one remains faithful to a cause only because its opponents do not
    cease to be insipid." (c) Friedrich Nietzsche



    Comment

    • KH

      #3
      Re: Run command line

      Thanks Michael!


      "Michael Nemtsev" wrote:
      [color=blue]
      > Hello kh,
      >
      > // Start a Web page using a browser associated with .html and
      > ..asp files.
      > Process.Start(" IExplore.exe", "C:\\myPath\\my File.htm");
      >
      > k> Isn't there a way to run a command-line string from .NET? Like:
      > k>
      > k> Shell.Execute( "del *.tmp" );
      > k>
      > k> Seems I remember one but can't find it right now. I thought it would
      > k> be on the Environment class, then I checked Console and Application.
      > k> Or am I smoking something? Anyone?
      > k>
      > k> TIA - Ken
      > k>
      > ---
      > WBR,
      > Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour
      >
      > "At times one remains faithful to a cause only because its opponents do not
      > cease to be insipid." (c) Friedrich Nietzsche
      >
      >
      >
      >[/color]

      Comment

      Working...