<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://xceed.com/CS/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Xceed FTP Library</title><link>http://xceed.com/CS/forums/24/ShowForum.aspx</link><description>Discussions about ActiveX-based file transfer</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Debug Build: 61120.2)</generator><item><title>Re: List all files on Ftp-Server</title><link>http://xceed.com/CS/forums/thread/17652.aspx</link><pubDate>Mon, 29 Dec 2008 19:42:51 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:17652</guid><dc:creator>Mohamed [Xceed]</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/17652.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=24&amp;PostID=17652</wfw:commentRss><description>&lt;P&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';"&gt;Hi Thorsten,&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';"&gt;you could use the method GetFiles (&lt;A href="http://doc.xceedsoft.com/products/XceedFileSystem/Xceed.FileSystem~Xceed.FileSystem.AbstractFolder~GetFiles(Boolean,Object%5b%5d).html"&gt;&lt;FONT color=#0000ff&gt;http://doc.xceedsoft.com/products/XceedFileSystem/Xceed.FileSystem~Xceed.FileSystem.AbstractFolder~GetFiles(Boolean,Object[]).html&lt;/FONT&gt;&lt;/A&gt;)&amp;nbsp;of the AbstractFolder with the Boolean &lt;EM&gt;&lt;SPAN style="FONT-FAMILY:'Arial','sans-serif';"&gt;recursive&lt;/SPAN&gt;&lt;/EM&gt;&amp;nbsp;&amp;nbsp;parameter set to true in order to get the list of all files on the FTP server including the sub folders.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-SIZE:10pt;FONT-FAMILY:'Arial','sans-serif';"&gt;For instance, you could modify the code snippet of Xceed Software samples as follow:&lt;/SPAN&gt;&lt;/P&gt;&lt;FONT size=1&gt;
&lt;P&gt;using( &lt;/FONT&gt;&lt;FONT color=#d85402 size=1&gt;&lt;FONT color=#d85402 size=1&gt;FtpConnection connection = new FtpConnection( hostname )&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt; )&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=1&gt;&lt;FONT color=#008000 size=1&gt;
&lt;P&gt;// You can begin with the starting folder by using the FtpFolder&lt;/P&gt;
&lt;P&gt;// constructor that only takes an FtpConnection.&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;&lt;FONT color=#0000ff size=1&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#d85402 size=1&gt;&lt;FONT color=#d85402 size=1&gt;AbstractFolder rootFolder = new FtpFolder( connection )&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Console.WriteLine( "The starting folder on {0} is '{1}'.",&lt;/P&gt;
&lt;P&gt;hostname, rootFolder.FullName );&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=1&gt;&lt;FONT color=#008000 size=1&gt;
&lt;P&gt;// You can access subfolders by asking any folder for a relative name&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;&lt;FONT color=#0000ff size=1&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#d85402 size=1&gt;&lt;FONT color=#d85402 size=1&gt;AbstractFolder firstFolder = rootFolder.GetFolder( firstRelativePath )&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Console.WriteLine( "You are now in '{0}'.", firstFolder.FullName );&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;&lt;FONT color=#0000ff size=1&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#d85402 size=1&gt;&lt;FONT color=#d85402 size=1&gt;AbstractFolder secondFolder = firstFolder.GetFolder( secondRelativePath )&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;;&lt;/P&gt;
&lt;P&gt;Console.WriteLine( "And now in '{0}'.", secondFolder.FullName );&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=1&gt;&lt;FONT color=#008000 size=1&gt;
&lt;P&gt;// When you know the exact full path of a folder, you can directly create&lt;/P&gt;
&lt;P&gt;// a new FtpFolder with that path.&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=1&gt;&lt;FONT color=#0000ff size=1&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color=#d85402 size=1&gt;&lt;FONT color=#d85402 size=1&gt;AbstractFolder absoluteFolder = new FtpFolder( connection, absolutePath )&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Console.WriteLine( "And finally in '{0}'.", absoluteFolder.FullName );&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#008000 size=1&gt;&lt;FONT color=#008000 size=1&gt;
&lt;P&gt;// Very important: Though we just created many instances accessing&lt;/P&gt;
&lt;P&gt;// different folders on this FTP server, the FTP FileSystem hides the&lt;/P&gt;
&lt;P&gt;// complexity of remembering the "current folder", as you need to do&lt;/P&gt;
&lt;P&gt;// when using a client-style interface. As you can see, each and every&lt;/P&gt;
&lt;P&gt;// instance created above are fully accessible.&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;
&lt;P&gt;Console.WriteLine( "*** rootFolder variable ***" );&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#800080 size=1&gt;&lt;FONT color=#800080 size=1&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;foreach( FileSystemItem item in &lt;/FONT&gt;&lt;FONT color=#800080 size=1&gt;&lt;FONT color=#800080 size=1&gt;rootFolder.GetFiles(true)&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt; )&lt;/P&gt;
&lt;P&gt;{&lt;/P&gt;
&lt;P&gt;Console.WriteLine( " {0}", item.&lt;/FONT&gt;&lt;FONT color=#800080 size=1&gt;&lt;FONT color=#800080 size=1&gt;Full&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;Name );&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;&lt;FONT color=#800080 size=1&gt;&lt;FONT color=#800080 size=1&gt;
&lt;P&gt;return;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=1&gt;
&lt;P&gt;}&lt;/P&gt;&lt;/FONT&gt;</description></item><item><title>List all files on Ftp-Server</title><link>http://xceed.com/CS/forums/thread/17646.aspx</link><pubDate>Sat, 27 Dec 2008 21:45:32 GMT</pubDate><guid isPermaLink="false">14592c03-f9d0-4f6b-b4cd-71e0e1b1f679:17646</guid><dc:creator>Thorsten</dc:creator><slash:comments>0</slash:comments><comments>http://xceed.com/CS/forums/thread/17646.aspx</comments><wfw:commentRss>http://xceed.com/CS/forums/commentrss.aspx?SectionID=24&amp;PostID=17646</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;how can i list all files on a ftp-server?&lt;/p&gt;&lt;p&gt;include sub-folders...&lt;/p&gt;&lt;p&gt;&amp;nbsp;thx&lt;/p&gt;&lt;p&gt;&amp;nbsp; THW68 &lt;br&gt;&lt;/p&gt;</description></item></channel></rss>