<?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[pruefen ob ordner vorhanden ist]]></title><description><![CDATA[<p>so mach ich es fuer ein file:</p>
<pre><code class="language-cpp">bool FileExist(LPCTSTR filename)
{	
   HANDLE f = CreateFile( filename,
                          GENERIC_READ ,
                          FILE_SHARE_READ, NULL, OPEN_EXISTING, 
                          FILE_ATTRIBUTE_NORMAL, NULL);

   if (f == INVALID_HANDLE_VALUE)
       return false;

   CloseHandle(f);
   return true;
}
</code></pre>
<p>wie koennte ich sowas fuer einen ordner machen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/163515/pruefen-ob-ordner-vorhanden-ist</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 13:47:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/163515.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 30 Oct 2006 13:41:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to pruefen ob ordner vorhanden ist on Mon, 30 Oct 2006 13:41:37 GMT]]></title><description><![CDATA[<p>so mach ich es fuer ein file:</p>
<pre><code class="language-cpp">bool FileExist(LPCTSTR filename)
{	
   HANDLE f = CreateFile( filename,
                          GENERIC_READ ,
                          FILE_SHARE_READ, NULL, OPEN_EXISTING, 
                          FILE_ATTRIBUTE_NORMAL, NULL);

   if (f == INVALID_HANDLE_VALUE)
       return false;

   CloseHandle(f);
   return true;
}
</code></pre>
<p>wie koennte ich sowas fuer einen ordner machen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1164474</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1164474</guid><dc:creator><![CDATA[Walti]]></dc:creator><pubDate>Mon, 30 Oct 2006 13:41:37 GMT</pubDate></item><item><title><![CDATA[Reply to pruefen ob ordner vorhanden ist on Mon, 30 Oct 2006 13:51:56 GMT]]></title><description><![CDATA[<p>Das geht (fast) genauso:</p>
<p>MSDN zu CreateFile schrieb:</p>
<blockquote>
<p>dwFlagsAndAttributes -&gt; FILE_FLAG_BACKUP_SEMANTICS<br />
[...]<br />
You can set this flag to obtain a handle to a directory. A directory handle can be passed to some functions instead of a file handle. For more information, see Obtaining A Handle to a Directory.</p>
</blockquote>
<p>Hier dann noch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/27a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--right_arrow"
      title=":arrow_right:"
      alt="➡"
    /> <a href="http://msdn.microsoft.com/library/en-us/fileio/fs/obtaining_a_handle_to_a_directory.asp" rel="nofollow">Obtaining A Handle to a Directory</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1164485</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1164485</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Mon, 30 Oct 2006 13:51:56 GMT</pubDate></item><item><title><![CDATA[Reply to pruefen ob ordner vorhanden ist on Mon, 30 Oct 2006 14:06:50 GMT]]></title><description><![CDATA[<p>Auf gar keinen Fall via &quot;CreateFile&quot; machen, da dies sonst die Datei/Verzeichnis verändert (zumindest das Datum) und teilweise diese nicht öffnen kann!</p>
<p>Verwende bitte &quot;GetFileAttributes&quot;!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1164499</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1164499</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Mon, 30 Oct 2006 14:06:50 GMT</pubDate></item><item><title><![CDATA[Reply to pruefen ob ordner vorhanden ist on Mon, 30 Oct 2006 14:12:43 GMT]]></title><description><![CDATA[<p>Jochen Kalmbach schrieb:</p>
<blockquote>
<p>Auf gar keinen Fall via &quot;CreateFile&quot; machen, da dies sonst die Datei/Verzeichnis verändert (zumindest das Datum) und teilweise diese nicht öffnen kann!</p>
<p>Verwende bitte &quot;GetFileAttributes&quot;!</p>
</blockquote>
<p>Und wie stehts mit GENERIC_READ ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1164506</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1164506</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Mon, 30 Oct 2006 14:12:43 GMT</pubDate></item><item><title><![CDATA[Reply to pruefen ob ordner vorhanden ist on Tue, 31 Oct 2006 07:19:44 GMT]]></title><description><![CDATA[<p>Verstehe Deine Frage nicht!? Ich sagte doch *kein* CreateFile! Das verändert den Dateieintrag für diese Datei... und backump-semantic kann nicht jeder Benutzer...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1165059</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1165059</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 31 Oct 2006 07:19:44 GMT</pubDate></item><item><title><![CDATA[Reply to pruefen ob ordner vorhanden ist on Tue, 31 Oct 2006 07:47:03 GMT]]></title><description><![CDATA[<p>Walti schrieb:</p>
<blockquote>
<p>so mach ich es fuer ein file:</p>
<pre><code class="language-cpp">bool FileExist(LPCTSTR filename)
...snip
</code></pre>
<p>wie koennte ich sowas fuer einen ordner machen?</p>
</blockquote>
<p>PathIsDirectory</p>
<p>Und Deine Funktion kann man auch ganu kurz mit PathFileExists ablösen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1165078</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1165078</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Tue, 31 Oct 2006 07:47:03 GMT</pubDate></item><item><title><![CDATA[Reply to pruefen ob ordner vorhanden ist on Tue, 31 Oct 2006 16:50:27 GMT]]></title><description><![CDATA[<p>FindFirstFile()</p>
<p>geht auch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1165527</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1165527</guid><dc:creator><![CDATA[Ulli]]></dc:creator><pubDate>Tue, 31 Oct 2006 16:50:27 GMT</pubDate></item></channel></rss>