<?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[Pfad trennen]]></title><description><![CDATA[<p>Hi guyz!</p>
<p>ich habe einen öffnen dialog mit multiselect, eine Parametereingabe, in die man mehrere getrennt von simikoli pfade eingeben kann.</p>
<p>Aber create file nimmt nur einen pfad. Wie kann ich die pfade trennen?</p>
<p>ALso:</p>
<p>c:\test1.txt;c:\test2.txt wird zu<br />
c:\test1.txt und c:\test2.txt</p>
<p>aber genauso geht das:<br />
c:\test1.txt,test2.txt<br />
wie kann ich das trennen?</p>
<p>Vielen Dank.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/203698/pfad-trennen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 00:53:17 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/203698.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 25 Jan 2008 12:54:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Pfad trennen on Fri, 25 Jan 2008 12:58:02 GMT]]></title><description><![CDATA[<p>Hi guyz!</p>
<p>ich habe einen öffnen dialog mit multiselect, eine Parametereingabe, in die man mehrere getrennt von simikoli pfade eingeben kann.</p>
<p>Aber create file nimmt nur einen pfad. Wie kann ich die pfade trennen?</p>
<p>ALso:</p>
<p>c:\test1.txt;c:\test2.txt wird zu<br />
c:\test1.txt und c:\test2.txt</p>
<p>aber genauso geht das:<br />
c:\test1.txt,test2.txt<br />
wie kann ich das trennen?</p>
<p>Vielen Dank.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1443415</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443415</guid><dc:creator><![CDATA[Script-Styler]]></dc:creator><pubDate>Fri, 25 Jan 2008 12:58:02 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad trennen on Fri, 25 Jan 2008 13:09:36 GMT]]></title><description><![CDATA[<p>viel spaß... &lt;vector&gt; includen nicht vergessen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<pre><code class="language-cpp">CString allepfade = &quot;C:\\test1.txt;c:\\blabla.txt;d:\\mutti.dat&quot;;//usw...
int pos = 0;
vector&lt;CString&gt; vec;//da stehen denn die einzelnen pfade drin...
for(int i = 0;;i++)
{
	CString teilstring = allepfade.Tokenize(&quot;;&quot;,pos);
	if(teilstring == &quot;&quot;) break;
	 vec.push_back(teilstring);
}

//danach:
//vec[0]  == C:\\test1.txt
//vec[1]  == c:\\blabla.txt
//vec[2]  == d:\\mutti.dat
//...
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1443421</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443421</guid><dc:creator><![CDATA[Machine]]></dc:creator><pubDate>Fri, 25 Jan 2008 13:09:36 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad trennen on Fri, 25 Jan 2008 13:18:54 GMT]]></title><description><![CDATA[<p>Ohne MFC geht das mit _strtok<br />
<a href="http://msdn2.microsoft.com/en-us/library/2c8d19sb(VS.71).aspx" rel="nofollow">http://msdn2.microsoft.com/en-us/library/2c8d19sb(VS.71).aspx</a></p>
<p>Oder:<br />
<a href="http://www.mpdvc.de/html.htm#Q17" rel="nofollow">http://www.mpdvc.de/html.htm#Q17</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1443429</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443429</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Fri, 25 Jan 2008 13:18:54 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad trennen on Fri, 25 Jan 2008 14:20:39 GMT]]></title><description><![CDATA[<p>Gibt es denn nicht eine möglichkeit, mit den shell path handling funcs?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1443483</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443483</guid><dc:creator><![CDATA[Code:)]]></dc:creator><pubDate>Fri, 25 Jan 2008 14:20:39 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad trennen on Fri, 25 Jan 2008 18:05:55 GMT]]></title><description><![CDATA[<p>geht das denn nicht ohne CString, also ich meine mit den reinen wchar.h-funktionen.</p>
<p>Danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1443591</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443591</guid><dc:creator><![CDATA[Script-Styler]]></dc:creator><pubDate>Fri, 25 Jan 2008 18:05:55 GMT</pubDate></item><item><title><![CDATA[Reply to Pfad trennen on Fri, 25 Jan 2008 19:10:08 GMT]]></title><description><![CDATA[<p>sry for dp/push</p>
<p>aber ich habe jetzt was ausprobiert, dummerweise landet das in einer entlosschleife. Warum? ich kann da keinen Fehler entdecken.</p>
<pre><code class="language-cpp">void Auto(LPWSTR lpPath)
{
	WCHAR path[MAX_PATH + 1];
	lstrcpy(path, lpPath);

	LPWSTR lpPtr = path;
	while (lpPtr != NULL)
	{
		int nLength;
		LPWSTR lpNextPtr = wcsstr(lpPtr, L&quot;;&quot;);

		// wenn kein weiteres Vorkommen
		if (lpNextPtr == NULL)
		{
			// no further ';', so get the whole string
			nLength = lstrlen(lpPtr);

			if (nLength == 0) // no string, nothing to do
				break;
		}
		else
		{
			// the difference is the new string
			nLength = (int)lpNextPtr + 1 /* the ';' char */ + (int)lpPtr;
			if (nLength == 0) // go on
			{
				lpPtr = lpNextPtr;
				continue;
			}
		}

		// this is the single path
		WCHAR single[MAX_PATH + 1];
		wcsncpy(single, lpPtr, nLength);
		single[nLength] = L'\0';

		/* do whatever you want */

		lpPtr = lpNextPtr;
	}
}
</code></pre>
<p>Vielen Dank.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1443643</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1443643</guid><dc:creator><![CDATA[Script-Styler]]></dc:creator><pubDate>Fri, 25 Jan 2008 19:10:08 GMT</pubDate></item></channel></rss>