<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Verzeichnis&#x2F;Ordner löschen]]></title><description><![CDATA[<p>Hallo,<br />
kann mir vielleicht einer sagen wie man in VC++6 ein gesamtes Verzeichnis, bzw. alle in dem Verzeichnis befindlichen Datei auf einen Rutsch löscht?</p>
<p>Gruß</p>
<p>Nils</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/173273/verzeichnis-ordner-löschen</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 06:08:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/173273.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 Feb 2007 15:28:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Verzeichnis&#x2F;Ordner löschen on Tue, 13 Feb 2007 15:28:34 GMT]]></title><description><![CDATA[<p>Hallo,<br />
kann mir vielleicht einer sagen wie man in VC++6 ein gesamtes Verzeichnis, bzw. alle in dem Verzeichnis befindlichen Datei auf einen Rutsch löscht?</p>
<p>Gruß</p>
<p>Nils</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1228225</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1228225</guid><dc:creator><![CDATA[Nils_]]></dc:creator><pubDate>Tue, 13 Feb 2007 15:28:34 GMT</pubDate></item><item><title><![CDATA[Reply to Verzeichnis&#x2F;Ordner löschen on Tue, 13 Feb 2007 15:45:03 GMT]]></title><description><![CDATA[<p>SHFileOperation könnte evtl helfen</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1228238</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1228238</guid><dc:creator><![CDATA[Pellaeon]]></dc:creator><pubDate>Tue, 13 Feb 2007 15:45:03 GMT</pubDate></item><item><title><![CDATA[Reply to Verzeichnis&#x2F;Ordner löschen on Tue, 13 Feb 2007 16:37:03 GMT]]></title><description><![CDATA[<p>Jo,<br />
hab vielen Dank. Es funktioniert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1228271</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1228271</guid><dc:creator><![CDATA[Nils_]]></dc:creator><pubDate>Tue, 13 Feb 2007 16:37:03 GMT</pubDate></item><item><title><![CDATA[Reply to Verzeichnis&#x2F;Ordner löschen on Wed, 05 Sep 2007 13:27:00 GMT]]></title><description><![CDATA[<p>Für alle die mit IE nichts zu tun haben wollen (SHFileOperation ist aus dem Internet Client SDK) hier:</p>
<pre><code>void deleteDirectoryR(std::string path) {

	WIN32_FIND_DATA fd;
	HANDLE hFile = FindFirstFile((path + &quot;*.*&quot;).c_str(), &amp;fd); //Erster Ordner ist immer .

	//
	// Wenn der Pfad nicht existiert dann ist 
	// hFile == INVALID_HANDLE_VALUE
	//

	while(FindNextFile(hFile, &amp;fd)) {
		std::string fileName(fd.cFileName);
		if(!(fileName == &quot;..&quot; || fileName == &quot;.&quot;)) {

			if(fd.dwFileAttributes &amp; FILE_ATTRIBUTE_DIRECTORY) {
				std::string nextFolderPath(path);
				nextFolderPath.append(fileName);
				nextFolderPath.append(&quot;\\&quot;);
				deleteDirectoryR(nextFolderPath);

				if(!RemoveDirectory(nextFolderPath.c_str())) {
					//
					// ERROR HANDLING
					// Fehlercode bekommt man mit GetLastError() und
					// sinnvollen Text dazu mit FormatMessage(...)
					// (Doku durchlesen)
					//
				}

			} else {
				if(!DeleteFile((path + fileName).c_str())) {
					//
					//ERROR HANDLING			
					//
				}
			}
		}
	}

	//
	// Wichtig! Sonst gibts einen Access Denied Fehler beim Ordner löschen 
	// wenn man aus der Rekursion zurückkommt...
	//
	FindClose(hFile); 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1359433</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1359433</guid><dc:creator><![CDATA[mfa]]></dc:creator><pubDate>Wed, 05 Sep 2007 13:27:00 GMT</pubDate></item></channel></rss>