List Info

Thread: How to download a file?




How to download a file?
user name
2006-09-19 21:20:27
On 9/19/06, Carlos Adriano Portes <xcap2000gmail.com> wrote:
> All I know to do is to execute a externer process, for
instance:
>
> using System;
> using System.Diagnostics;
>
> namespace Estudo
> {
>         public class ExternalProcess
>         {
>                 public static void Main(string[] args)
>                 {
>                         if(args.Length == 1)
>                         {
>                                 Process pr = new
Process();
>                                 pr.EnableRaisingEvents
= false;
>                                 pr.StartInfo.FileName =
"ls";
>                                 pr.StartInfo.Arguments
= "-la " + args[0];
>                                 pr.Start();
>                                 pr.WaitForExit();
>                                 if(pr.ExitCode != 0)
>                                 {
>                                        
Console.WriteLine("Error while using ls.");
>                                 }
>                         }
>                 }
>         }
> }
>
> but I do not know how to read its output and use a
separate thread in
> c#, could you help me...
>

A quick google search gave this:

h
ttp://www.codeproject.com/csharp/LaunchProcess.asp

/Jacob

> 2006/9/19, Jacob Ilsų Christensen <jacobilsoegmail.com>:
> > I guess you would spawn wget in a separate thread
and continually read
> > its standard output to update the progress bar.
You can find
> > documentation on the progressbar here:
> >
> > http://go-mono.com/docs/monodoc.ashx?link=T%3aGtk.P
rogressBar
> >
> > /Jacob
> >
> >
> >
> > On 9/19/06, Carlos Adriano Portes <xcap2000gmail.com> wrote:
> > > Hi
> > >
> > > I would like to know how to download a file
using wget and show its
> > > progress in a progress bar from my
application, can someone give me an
> > > example?
> > >
_______________________________________________
> > > Monodevelop-list mailing list
> > > Monodevelop-listlists.ximian.com
> > > http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
> > >
> >
>
_______________________________________________
Monodevelop-list mailing list
Monodevelop-listlists.ximian.com
http://lists.ximian.com/mailman/listinfo/monodevelop-li
st
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )