I need to use findstr command in vb.net windows application. I have tried the following code but it doesn't work. I need to search a string from a text file and copy the result to another text file. This works well in command prompt but not in vb.net windows.
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim strItem As String = "ABC78611"
Dim proc As ProcessStartInfo = New ProcessStartInfo
proc.FileName = ("cmd.exe")
proc.Arguments = ("findstr /i """ & strItem & """C:\A\JOETEXT.txt > C:\A\JOE.txt")
Dim pr As Process
proc.WindowStyle = ProcessWindowStyle.Hidden
pr = Process.Start(proc)