<?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: Recursively deleting directories via FTP</title>
	<atom:link href="http://aidanlister.com/2004/04/recursively-deleting-directories-via-ftp/feed/" rel="self" type="application/rss+xml" />
	<link>http://aidanlister.com/2004/04/recursively-deleting-directories-via-ftp/</link>
	<description>Code is poetry</description>
	<lastBuildDate>Tue, 09 Mar 2010 10:53:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Monkhorst</title>
		<link>http://aidanlister.com/2004/04/recursively-deleting-directories-via-ftp/comment-page-1/#comment-981</link>
		<dc:creator>Monkhorst</dc:creator>
		<pubDate>Fri, 10 Jul 2009 09:33:16 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=66#comment-981</guid>
		<description>Unfortunately, on windows the recursive option of ftp_rawlist() does not work (at least not on my machine and Turigeza&#039;s).
The function above can be altered a bit to be recursive. This solves the issue.

I can&#039;t post the entire function, but here is the change:
Reverse the order of the files and folder handling and replace with:

// delete the subfolders recursively
foreach ($folders as $folder) {
    self::ftp_rmdirr($ftp_stream, $folder);
}

// then delete all the files
    foreach ($files as $file) {
    ftp_delete($ftp_stream, $file);
}

Hope this helps - Monkhorst</description>
		<content:encoded><![CDATA[<p>Unfortunately, on windows the recursive option of ftp_rawlist() does not work (at least not on my machine and Turigeza&#8217;s).<br />
The function above can be altered a bit to be recursive. This solves the issue.</p>
<p>I can&#8217;t post the entire function, but here is the change:<br />
Reverse the order of the files and folder handling and replace with:</p>
<p>// delete the subfolders recursively<br />
foreach ($folders as $folder) {<br />
    self::ftp_rmdirr($ftp_stream, $folder);<br />
}</p>
<p>// then delete all the files<br />
    foreach ($files as $file) {<br />
    ftp_delete($ftp_stream, $file);<br />
}</p>
<p>Hope this helps &#8211; Monkhorst</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: theo</title>
		<link>http://aidanlister.com/2004/04/recursively-deleting-directories-via-ftp/comment-page-1/#comment-695</link>
		<dc:creator>theo</dc:creator>
		<pubDate>Mon, 01 Jun 2009 03:33:17 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=66#comment-695</guid>
		<description>im having some issues i put the directory but it tries to delete everything form outside the folder and then it goes into the folder and tries to find the folders that are actually outside the folder?</description>
		<content:encoded><![CDATA[<p>im having some issues i put the directory but it tries to delete everything form outside the folder and then it goes into the folder and tries to find the folders that are actually outside the folder?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marke</title>
		<link>http://aidanlister.com/2004/04/recursively-deleting-directories-via-ftp/comment-page-1/#comment-568</link>
		<dc:creator>Marke</dc:creator>
		<pubDate>Sun, 12 Apr 2009 15:32:46 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=66#comment-568</guid>
		<description>So cool.</description>
		<content:encoded><![CDATA[<p>So cool.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saudi</title>
		<link>http://aidanlister.com/2004/04/recursively-deleting-directories-via-ftp/comment-page-1/#comment-563</link>
		<dc:creator>Saudi</dc:creator>
		<pubDate>Mon, 07 Aug 2006 20:23:36 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=66#comment-563</guid>
		<description>Hello,
Thanks for great function.</description>
		<content:encoded><![CDATA[<p>Hello,<br />
Thanks for great function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juha Halmu</title>
		<link>http://aidanlister.com/2004/04/recursively-deleting-directories-via-ftp/comment-page-1/#comment-513</link>
		<dc:creator>Juha Halmu</dc:creator>
		<pubDate>Tue, 31 Jan 2006 22:53:40 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=66#comment-513</guid>
		<description>(bad english:)Don&#039;t know if I have &quot;old server&quot; in use. There is no effect if inner folders have less permissions like 644?</description>
		<content:encoded><![CDATA[<p>(bad english:)Don&#8217;t know if I have &#8220;old server&#8221; in use. There is no effect if inner folders have less permissions like 644?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aidan Lister</title>
		<link>http://aidanlister.com/2004/04/recursively-deleting-directories-via-ftp/comment-page-1/#comment-473</link>
		<dc:creator>Aidan Lister</dc:creator>
		<pubDate>Sun, 20 Nov 2005 20:52:57 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=66#comment-473</guid>
		<description>It seems that some FTP servers don&#039;t support the recursive raw listing. From what I can tell, this is a small number of old servers. In these cases, the function above won&#039;t work.</description>
		<content:encoded><![CDATA[<p>It seems that some FTP servers don&#8217;t support the recursive raw listing. From what I can tell, this is a small number of old servers. In these cases, the function above won&#8217;t work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Turigeza</title>
		<link>http://aidanlister.com/2004/04/recursively-deleting-directories-via-ftp/comment-page-1/#comment-466</link>
		<dc:creator>Turigeza</dc:creator>
		<pubDate>Tue, 08 Nov 2005 00:35:45 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=66#comment-466</guid>
		<description>to add I&#039;m on Windows XP and PHP 5.0.4
an it seems the recursive parameter for the ftp_rawlist() makes no diffrence for me ?? so that&#039;s why your function didn&#039;t work.</description>
		<content:encoded><![CDATA[<p>to add I&#8217;m on Windows XP and PHP 5.0.4<br />
an it seems the recursive parameter for the ftp_rawlist() makes no diffrence for me ?? so that&#8217;s why your function didn&#8217;t work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Turigeza</title>
		<link>http://aidanlister.com/2004/04/recursively-deleting-directories-via-ftp/comment-page-1/#comment-465</link>
		<dc:creator>Turigeza</dc:creator>
		<pubDate>Tue, 08 Nov 2005 00:04:17 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=66#comment-465</guid>
		<description>Doesn&#039;t recursive mean that the function will call itself ??

This function doesn&#039;t work for me :(
folder/folder1/folder2/folder3/folder4/
ftp_rmdirr($ftp_stream, &#039;folder/folder1&#039;)
won&#039;t delete folder1 and says directory is not empty</description>
		<content:encoded><![CDATA[<p>Doesn&#8217;t recursive mean that the function will call itself ??</p>
<p>This function doesn&#8217;t work for me <img src='http://aidanlister.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
folder/folder1/folder2/folder3/folder4/<br />
ftp_rmdirr($ftp_stream, &#8216;folder/folder1&#8242;)<br />
won&#8217;t delete folder1 and says directory is not empty</p>
]]></content:encoded>
	</item>
</channel>
</rss>
