a simple file related doubt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • krishna2nd
    New Member
    • Apr 2007
    • 2

    a simple file related doubt

    i m new 2 dis tech.. my problem in C# .. i want to create a batch file according to the input commands and exicute that batch file in CMD prompt

    --------------------------------------------------------------------------------
  • Teenzonez
    New Member
    • Mar 2007
    • 36

    #2
    Hi
    I have the same doubt...please help to resolve it...

    Regards
    TeenzoneZ

    Comment

    • decyclone
      New Member
      • Dec 2006
      • 7

      #3
      Originally posted by krishna2nd
      i m new 2 dis tech.. my problem in C# .. i want to create a batch file according to the input commands and exicute that batch file in CMD prompt

      --------------------------------------------------------------------------------
      Can you explain your scenario in more details?
      I mean what kind of app. are you building? Console or Win Forms?
      And what excactly are you trying to achieve?

      Jay Joshi,
      decyclone@gmail .com

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        You could probably accomplish your task with something like this:

        System.IO.Strea mWriter sw=System.IO.Fi le.CreateText(F ileName);
        sw.Write(TextSt ring);
        sw.Write("\r\n" );
        sw.WriteLine(Mo reTextString);
        sw.Close();
        System.Diagnost ics.Process.Sta rt(FileName);


        If you dig deeper into the Process object you will find ways to run things "in the background" and the like.

        Comment

        Working...