<?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[SearchPath scheitert]]></title><description><![CDATA[<p>Hi@All.</p>
<p>Ich muss Dateien in einem bestimmten Verzeichnis und deren Untervderzeichnisse auflisten.</p>
<p>Dazu kahm mir die SearchPath-Funktion sehr gut daher.</p>
<pre><code class="language-cpp">TCHAR Path[MAX_PATH+1] = &quot;C:\\&quot;;
TCHAR File[MAX_PATH+1] = &quot;.bat&quot;;
TCHAR Buffer[MAX_PATH+1];
LPTSTR lpFilePart[5];

while (SearchPath(Path, File, NULL, MAX_PATH, Buffer, lpFilePart))
{
	MessageBox(NULL, Buffer, &quot;Search&quot;, MB_OK);
}
</code></pre>
<p>Was hat es mit dem lpFilePart aufsich? wiviele Elemente muss er haben?</p>
<p>Wie soll ich mit GetLastError überprüfen, was fehlschlägt?</p>
<p>Danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/192050/searchpath-scheitert</link><generator>RSS for Node</generator><lastBuildDate>Wed, 01 Jul 2026 03:06:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/192050.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 10 Sep 2007 04:05:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to SearchPath scheitert on Mon, 10 Sep 2007 04:06:20 GMT]]></title><description><![CDATA[<p>Hi@All.</p>
<p>Ich muss Dateien in einem bestimmten Verzeichnis und deren Untervderzeichnisse auflisten.</p>
<p>Dazu kahm mir die SearchPath-Funktion sehr gut daher.</p>
<pre><code class="language-cpp">TCHAR Path[MAX_PATH+1] = &quot;C:\\&quot;;
TCHAR File[MAX_PATH+1] = &quot;.bat&quot;;
TCHAR Buffer[MAX_PATH+1];
LPTSTR lpFilePart[5];

while (SearchPath(Path, File, NULL, MAX_PATH, Buffer, lpFilePart))
{
	MessageBox(NULL, Buffer, &quot;Search&quot;, MB_OK);
}
</code></pre>
<p>Was hat es mit dem lpFilePart aufsich? wiviele Elemente muss er haben?</p>
<p>Wie soll ich mit GetLastError überprüfen, was fehlschlägt?</p>
<p>Danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1362283</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1362283</guid><dc:creator><![CDATA[Script-Styler]]></dc:creator><pubDate>Mon, 10 Sep 2007 04:06:20 GMT</pubDate></item><item><title><![CDATA[Reply to SearchPath scheitert on Mon, 10 Sep 2007 04:42:01 GMT]]></title><description><![CDATA[<p>Das ist die falsche Funktion... Nimm lieber:<br />
- FindFirstFile, FindNextFile und FindClose</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1362285</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1362285</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Mon, 10 Sep 2007 04:42:01 GMT</pubDate></item><item><title><![CDATA[Reply to SearchPath scheitert on Mon, 10 Sep 2007 06:06:25 GMT]]></title><description><![CDATA[<p>naja, das weiß ich ja ganz nicht.</p>
<p>ich will nicht alle! dateien eines verzeichnisses, sondern nur die, die eine Zeichenkette insich tragen, nach der gesucht wird.</p>
<p>unterverzeichnisse sind auch noch zu durchsuchen.</p>
<p>wie das?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1362300</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1362300</guid><dc:creator><![CDATA[Script-Styler]]></dc:creator><pubDate>Mon, 10 Sep 2007 06:06:25 GMT</pubDate></item><item><title><![CDATA[Reply to SearchPath scheitert on Mon, 10 Sep 2007 07:17:35 GMT]]></title><description><![CDATA[<p>- rekursive Funktion bauen<br />
- FindFirst, FindNext benutzen<br />
- gefundenes File auf bestimmte Zeichenkette überprüfen<br />
-&gt; Zeichenkette vorhanden: File listen<br />
-&gt; Zeichenkette nicht vorhanden: File nicht listen</p>
<p>Ganz einfach eigentlich. Sollte in 10 Minuten geschrieben sein...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1362319</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1362319</guid><dc:creator><![CDATA[Machine]]></dc:creator><pubDate>Mon, 10 Sep 2007 07:17:35 GMT</pubDate></item><item><title><![CDATA[Reply to SearchPath scheitert on Mon, 10 Sep 2007 07:45:41 GMT]]></title><description><![CDATA[<p>na gut!<br />
aber wofür ist dann dieses SearchPath-vieh??</p>
<p>danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1362337</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1362337</guid><dc:creator><![CDATA[Script-Styler]]></dc:creator><pubDate>Mon, 10 Sep 2007 07:45:41 GMT</pubDate></item><item><title><![CDATA[Reply to SearchPath scheitert on Mon, 10 Sep 2007 07:55:49 GMT]]></title><description><![CDATA[<p>Wofür das searchpath ist, kann ich dir nicht sagen.. hab ich noch nie benutzt...<br />
Hier mal ein Beispiel für die Suchfunktion</p>
<pre><code class="language-cpp">bool Claas::FindFilesRecurse(LPCTSTR pstr) 
{ 
	CFileFind finder; 

	CString strWildcard(pstr); 
	strWildcard += _T(&quot;\\*.*&quot;); 
	BOOL bWorking = finder.FindFile(strWildcard); 

	while (bWorking) 
	{ 
		bWorking = finder.FindNextFile(); 

		if (finder.IsDots()) 
			continue;

		if (finder.IsDirectory()) 
		{ 
			CString str = finder.GetFilePath(); 

			FindFilesRecurse(str);
			continue;
		}
		CString file = finder.GetFilePath();
		//Hier was mit dem Path machen...
                //if(path.Find(&quot;bestimmter string&quot;) != -1)
                //oder so..
	}
	finder.Close(); 
	return true;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1362342</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1362342</guid><dc:creator><![CDATA[Machine]]></dc:creator><pubDate>Mon, 10 Sep 2007 07:55:49 GMT</pubDate></item><item><title><![CDATA[Reply to SearchPath scheitert on Mon, 10 Sep 2007 19:28:43 GMT]]></title><description><![CDATA[<p>SearchPath wird verwendet, um eine Datei zu suchen, die sich entweder im aktuellen oder im Systemverzeichnis befindet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1362843</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1362843</guid><dc:creator><![CDATA[a]]></dc:creator><pubDate>Mon, 10 Sep 2007 19:28:43 GMT</pubDate></item></channel></rss>