Will check it out.Basically seemed to need to use System.Console.WriteLine to output to window, and used System.Diagnostics.Process to execute a batch file that I passed arguments to, but it worked well enough for now.
Stay well Jacob Kruger Blind Biker Skype: BlindZA '...fate had broken his body, but not his spirit...'----- Original Message ----- From: "Mark Long" <markalong64@xxxxxxxxxxx>
To: <program-l@xxxxxxxxxxxxx> Sent: Monday, August 09, 2010 12:07 PMSubject: [program-l] Re: C# console application executing command line commands?
Console apps in C# are really nice to write, actually. The docs here will get you started. http://msdn.microsoft.com/en-us/library/452fz12a(VS.80).aspxThe short version is that you create a console type app in Visual Studio. You can use any classes that you like in the app as per usual. All I/O is done using the Console class which gets imported for free. Because you are not supporting a window, your app ends when execution falls out of the main method just as it would with an old skool C application.Hope that helps Mark ________________________________From: jacobk@xxxxxxxxxxxxxx To: program-l@xxxxxxxxxxxxx CC: ProgrammingBlind@xxxxxxxxxxxxxSubject: [program-l] C# console application executing command line commands?Date: Wed, 4 Aug 2010 19:40:23 +0200 Ok, next silly question... Since have never really created command line/console applications, am now just trying to figure out how to get a console application created in C# to execute command line commands, and then how to get it to close/exit itsself after operation? Idea would be to create a slightly trumped up target for something like a send to shortcut that can do a bit more than your average batch file. Have looked for simple examples, but am obviously, again, using incorrect search terms or something - LOL! TIA Jacob Kruger Blind Biker Skype: BlindZA '...fate had broken his body, but not his spirit...' __________ Information from ESET NOD32 Antivirus, version of virus signature database 5341 (20100804) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com** To leave the list, click on the immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If this link doesn't work then send a message to: ** program-l-request@xxxxxxxxxxxxx ** and in the Subject line type ** unsubscribe ** For other list commands such as vacation mode, click on the ** immediately-following link:- ** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a message, to ** program-l-request@xxxxxxxxxxxxx with the Subject:- faq__________ Information from ESET NOD32 Antivirus, version of virus signature database 5353 (20100809) __________The message was checked by ESET NOD32 Antivirus. http://www.eset.com
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5353 (20100809) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __________View the list's information and change your settings at //www.freelists.org/list/programmingblind