Get size of file on ftp server before downloading

Hi,

How can I get the size of a file on an ftp server before downloading the 
file.  Basically I want to create a progress bar to show the progress of the 
download as its being downloaded.  If anyone could point me to any good 
resources or explain what i need to do.  I am using Visual Studio 2010 beta, 
but code needs to be able to be run on 2.0 framework, if possible.

Thanks in advance,

Adam 


0
Adam
3/11/2010 3:41:14 AM
dotnet.framework 137 articles. 0 followers. Follow

2 Replies
1701 Views

Similar Articles

[PageSpeed] 7

> How can I get the size of a file on an ftp server before downloading the 
> file.  Basically I want to create a progress bar to show the progress of 
> the download as its being downloaded.  If anyone could point me to any 
> good resources or explain what i need to do.  I am using Visual Studio 
> 2010 beta, but code needs to be able to be run on 2.0 framework, if 
> possible.

http://msdn.microsoft.com/en-us/library/system.net.webrequestmethods.ftp.getfilesize.aspx
(available in .NET Framework 2.0)

-- 
Mike
GoTinker, C# Blog
http://www.gotinker.com 

0
Mike
3/11/2010 3:56:47 AM
Thanks Mike,

Searching on that function, i found the article below and it has worked for 
me.

(http://social.msdn.microsoft.com/Forums/en-US/netfxnetcom/thread/0206feb5-90fe-4296-8fae-739dbbe4609c


"Mike Lovell" <dont.reply@gotinker.com> wrote in message 
news:ufimj7MwKHA.404@TK2MSFTNGP02.phx.gbl...
>> How can I get the size of a file on an ftp server before downloading the 
>> file.  Basically I want to create a progress bar to show the progress of 
>> the download as its being downloaded.  If anyone could point me to any 
>> good resources or explain what i need to do.  I am using Visual Studio 
>> 2010 beta, but code needs to be able to be run on 2.0 framework, if 
>> possible.
>
> http://msdn.microsoft.com/en-us/library/system.net.webrequestmethods.ftp.getfilesize.aspx
> (available in .NET Framework 2.0)
>
> -- 
> Mike
> GoTinker, C# Blog
> http://www.gotinker.com 


0
Adam
3/11/2010 4:36:24 AM
Reply:

Similar Artilces: