I want to open one notepad file by using command prompt.I wrote this codes
Process proc = new Process();
ProcessStartInfo ps = new ProcessStartInfo("cmd.exe");
ps.Arguments = "notepad E:\\Zlabel.txt";
proc.StartInfo = ps;
proc.Start();
But i am not getting the desired result. It is just opening cmd.
Just use:
Process.Start("E:\\Zlabel.txt");It should work ok. The file will be opened in the default viewer for the txt extension.
For Printing
You might use the Print command.