<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Using the C# WebClient class to upload and download FTP files</title>
	<atom:link href="http://www.dijksterhuis.org/webclient-class-upload-download-ftp-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dijksterhuis.org/webclient-class-upload-download-ftp-files/</link>
	<description>Information, news about programming in C#</description>
	<lastBuildDate>Sat, 04 Jun 2011 10:24:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
	<item>
		<title>By: Jake Paine</title>
		<link>http://www.dijksterhuis.org/webclient-class-upload-download-ftp-files/comment-page-1/#comment-10351</link>
		<dc:creator>Jake Paine</dc:creator>
		<pubDate>Tue, 10 May 2011 15:30:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=693#comment-10351</guid>
		<description>Would you be able to use this with folders too?</description>
		<content:encoded><![CDATA[<p>Would you be able to use this with folders too?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Basha</title>
		<link>http://www.dijksterhuis.org/webclient-class-upload-download-ftp-files/comment-page-1/#comment-7046</link>
		<dc:creator>Basha</dc:creator>
		<pubDate>Mon, 04 Apr 2011 06:20:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=693#comment-7046</guid>
		<description>Hi,

my Question is 

1) i can download ftp files through my server.
2) but can any one say me how to download ftp files by date

EX:  xys03-01-2011.zip
       xys03-31-2011.zip

the code which i use is

        private void Form1_Load(object sender, EventArgs e)
        {

            string dateString = DateTime.Now.ToString(&quot;MM-dd-yyyy&quot;);
            string filename = string.Format(&quot;xys{0}.zip&quot;, dateString);
            string localPath = &quot;c:\\&quot;;
            string fileName = filename;
            string defaultLocalFolder_MCX = &quot;C:\\&quot;;

            FastZip fzMCX = new FastZip();

            try
            {
                fzMCX.ExtractZip(defaultLocalFolder_MCX + &quot;\\&quot; + &quot;xys03-31-2011.zip&quot;, defaultLocalFolder_MCX, &quot;&quot;);
            }

            catch (Exception)
            {
            }


            FtpWebRequest requestFileDownload = (FtpWebRequest)WebRequest.Create(&quot;ftp://localhost/Source/&quot; + fileName);
            requestFileDownload.Credentials = new NetworkCredential(&quot;test&quot;, &quot;test&quot;);
            requestFileDownload.Method = WebRequestMethods.Ftp.DownloadFile;

            FtpWebResponse responseFileDownload = (FtpWebResponse)requestFileDownload.GetResponse();

            Stream responseStream = responseFileDownload.GetResponseStream();
            FileStream writeStream = new FileStream(localPath + fileName, FileMode.Create);

            int Length = 2048;
            Byte[] buffer = new Byte[Length];
            int bytesRead = responseStream.Read(buffer, 0, Length);
            while (bytesRead &gt; 0)
            {
                writeStream.Write(buffer, 0, bytesRead);
                bytesRead = responseStream.Read(buffer, 0, Length);
            }
            responseStream.Close();
            writeStream.Close();

            requestFileDownload = null;
            responseFileDownload = null;
        }

please help me

Thanks in Advance</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>my Question is </p>
<p>1) i can download ftp files through my server.<br />
2) but can any one say me how to download ftp files by date</p>
<p>EX:  xys03-01-2011.zip<br />
       xys03-31-2011.zip</p>
<p>the code which i use is</p>
<p>        private void Form1_Load(object sender, EventArgs e)<br />
        {</p>
<p>            string dateString = DateTime.Now.ToString(&#8220;MM-dd-yyyy&#8221;);<br />
            string filename = string.Format(&#8220;xys{0}.zip&#8221;, dateString);<br />
            string localPath = &#8220;c:\\&#8221;;<br />
            string fileName = filename;<br />
            string defaultLocalFolder_MCX = &#8220;C:\\&#8221;;</p>
<p>            FastZip fzMCX = new FastZip();</p>
<p>            try<br />
            {<br />
                fzMCX.ExtractZip(defaultLocalFolder_MCX + &#8220;\\&#8221; + &#8220;xys03-31-2011.zip&#8221;, defaultLocalFolder_MCX, &#8220;&#8221;);<br />
            }</p>
<p>            catch (Exception)<br />
            {<br />
            }</p>
<p>            FtpWebRequest requestFileDownload = (FtpWebRequest)WebRequest.Create(&#8220;ftp://localhost/Source/&#8221; + fileName);<br />
            requestFileDownload.Credentials = new NetworkCredential(&#8220;test&#8221;, &#8220;test&#8221;);<br />
            requestFileDownload.Method = WebRequestMethods.Ftp.DownloadFile;</p>
<p>            FtpWebResponse responseFileDownload = (FtpWebResponse)requestFileDownload.GetResponse();</p>
<p>            Stream responseStream = responseFileDownload.GetResponseStream();<br />
            FileStream writeStream = new FileStream(localPath + fileName, FileMode.Create);</p>
<p>            int Length = 2048;<br />
            Byte[] buffer = new Byte[Length];<br />
            int bytesRead = responseStream.Read(buffer, 0, Length);<br />
            while (bytesRead &gt; 0)<br />
            {<br />
                writeStream.Write(buffer, 0, bytesRead);<br />
                bytesRead = responseStream.Read(buffer, 0, Length);<br />
            }<br />
            responseStream.Close();<br />
            writeStream.Close();</p>
<p>            requestFileDownload = null;<br />
            responseFileDownload = null;<br />
        }</p>
<p>please help me</p>
<p>Thanks in Advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andylu</title>
		<link>http://www.dijksterhuis.org/webclient-class-upload-download-ftp-files/comment-page-1/#comment-4723</link>
		<dc:creator>andylu</dc:creator>
		<pubDate>Fri, 12 Nov 2010 20:26:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=693#comment-4723</guid>
		<description>it&#039;s wonderful..!!!!! thanks for the code.... 100% correct</description>
		<content:encoded><![CDATA[<p>it&#8217;s wonderful..!!!!! thanks for the code&#8230;. 100% correct</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren Lee</title>
		<link>http://www.dijksterhuis.org/webclient-class-upload-download-ftp-files/comment-page-1/#comment-2957</link>
		<dc:creator>Darren Lee</dc:creator>
		<pubDate>Tue, 18 May 2010 12:34:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=693#comment-2957</guid>
		<description>Hi,

I think it&#039;s really brilliant and such a professional class you wrote, it&#039;s helpful for my current project, I&#039;ve looked for it for a long while, thanks for your sharing.

One suggestion, I think the BasicFTPClient still needs one more function which enables user to browse all the files that are stored in a certain FTP folder, so that users would not have to type in an exact title of the file that he/she wants to download, hopefully it would make the class going perfect.

Thanks again for your knowledge shared.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I think it&#8217;s really brilliant and such a professional class you wrote, it&#8217;s helpful for my current project, I&#8217;ve looked for it for a long while, thanks for your sharing.</p>
<p>One suggestion, I think the BasicFTPClient still needs one more function which enables user to browse all the files that are stored in a certain FTP folder, so that users would not have to type in an exact title of the file that he/she wants to download, hopefully it would make the class going perfect.</p>
<p>Thanks again for your knowledge shared.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rohit Prakash</title>
		<link>http://www.dijksterhuis.org/webclient-class-upload-download-ftp-files/comment-page-1/#comment-1242</link>
		<dc:creator>Rohit Prakash</dc:creator>
		<pubDate>Sat, 29 Aug 2009 06:53:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.dijksterhuis.org/?p=693#comment-1242</guid>
		<description>Thanks for the code. I needed it urgently.

Do you have any idea of determining the file version of any file located on a remote server?</description>
		<content:encoded><![CDATA[<p>Thanks for the code. I needed it urgently.</p>
<p>Do you have any idea of determining the file version of any file located on a remote server?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

