redirecting the contents of command promt to a file
C#
1
Posts
1
Posters
0
Views
1
Watching
-
Hi , I need to redirect the contents of the command to a file. I tried doing this using follwing peice of code but it doesnt seem to be working. System.Diagnostics.Process QueryProcess = new System.Diagnostics.Process(); String command = @"ipconfig/all"; QueryProcess.StartInfo.FileName = command; QueryProcess.StartInfo.Arguments = " >c:\\a.txt"; QueryProcess.Start(); QueryProcess.Close(); Kindly look into the problemand tell me the solution ASAP. Thanks and Regards,
Sankalp Verma