Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void Start()
- {
- try
- {
- Process process = new Process();
- process.StartInfo.FileName = "path of wget.exe";
- process.StartInfo.Arguments = "wget -r -c -np --retry-connrefused --tries=0 http://url/folder1 -P E:\Images --cut-dirs=2 -nH -A j2k -o E:\Images\error.log";
- process.EnableRaisingEvents = false;
- process.StartInfo.UseShellExecute = false;
- process.StartInfo.RedirectStandardError = true;
- process.StartInfo.WindowStyle = ProcessWindowStyle.Hide;
- process.ErrorDataReceived += new DataReceivedEventHandler(ProcessErrorDataRecieved);
- process.Start()
- process.BeginErrorReadLine();
- process.WaitForExit();
- }
- catch (Exception ex)
- {
- /////
- }
- }
- private void ProcessErrorDataRecieved(object sender, DataReceivedEventArgs e)
- {
- MessageBox.Show(e.Data);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement