<?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[Ordnerstrucktur auslessen]]></title><description><![CDATA[<p>Hi ich will eine Ordnerstruktur samt Unterordner auslesen und sie dann in ein Tree View speichern. Ich weiß wie ich die Daten aus einem Ordner raus bekomme aber nicht wie ich auch die Unteroder bekomme. Kann mir jemand helfen?</p>
<p>Viele Dank im Voraus</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/164616/ordnerstrucktur-auslessen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 12 Aug 2026 11:32:55 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/164616.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 10 Nov 2006 12:54:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ordnerstrucktur auslessen on Fri, 10 Nov 2006 12:54:13 GMT]]></title><description><![CDATA[<p>Hi ich will eine Ordnerstruktur samt Unterordner auslesen und sie dann in ein Tree View speichern. Ich weiß wie ich die Daten aus einem Ordner raus bekomme aber nicht wie ich auch die Unteroder bekomme. Kann mir jemand helfen?</p>
<p>Viele Dank im Voraus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1172170</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1172170</guid><dc:creator><![CDATA[Wnerer2005]]></dc:creator><pubDate>Fri, 10 Nov 2006 12:54:13 GMT</pubDate></item><item><title><![CDATA[Reply to Ordnerstrucktur auslessen on Fri, 10 Nov 2006 12:58:24 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Rekursion über die Unterordner.<br />
Genaueres können wir erst sagen, wenn du uns sagts wie du Ordnerdaten auslesen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1172173</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1172173</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Fri, 10 Nov 2006 12:58:24 GMT</pubDate></item><item><title><![CDATA[Reply to Ordnerstrucktur auslessen on Fri, 10 Nov 2006 13:07:43 GMT]]></title><description><![CDATA[<p>also ich benutze FindFirst... hab mich hierbei an die Hilfe von Borland gehalten.</p>
<pre><code class="language-cpp">TSearchRec sr;
	 int iAttributes = 0;
	 iAttributes |= faReadOnly * CheckBox1-&gt;Checked;
	 iAttributes |= faHidden * CheckBox2-&gt;Checked;
	 iAttributes |= faSysFile * CheckBox3-&gt;Checked;
	 iAttributes |= faVolumeID * CheckBox4-&gt;Checked;
	 iAttributes |= faDirectory * CheckBox5-&gt;Checked;
	 iAttributes |= faArchive * CheckBox6-&gt;Checked;
	 iAttributes |= faAnyFile * CheckBox7-&gt;Checked;
	 if (FindFirst(path, iAttributes, sr) == 0)
	  {
		do
		{
		  if ((sr.Attr &amp; iAttributes) == sr.Attr)
		  {
				if(wo == 1){
					if(sr.Name != &quot;..&quot; &amp;&amp; sr.Name != &quot;.&quot;){
					TreeView1-&gt;Items-&gt;Add(0,Text+sr.Name);
					}
				}		
		  }
		} while (FindNext(sr) == 0);
		FindClose(sr);
	  }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1172184</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1172184</guid><dc:creator><![CDATA[Wnerer2005]]></dc:creator><pubDate>Fri, 10 Nov 2006 13:07:43 GMT</pubDate></item><item><title><![CDATA[Reply to Ordnerstrucktur auslessen on Fri, 10 Nov 2006 13:24:27 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>mit dieser Methode wirst du feststellen, das in der Ergebnismenge auch die Namen der Unterverzeichnisse enthalten sind. Welche das sind, kannst du über die Eigenschaft <em>TSearchRec::Attr</em> herausfinden.<br />
Also must du nur für alle gefundenen Unterordner die Suche neu starten, indem du den Namen des Unterordners an die Variable path anfängst.<br />
Es ist also erstmal sinnvoll, den Code in eine Methode auszulagern, die als Parameter den kompletten Pfad entgegennimmt.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1172195</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1172195</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Fri, 10 Nov 2006 13:24:27 GMT</pubDate></item><item><title><![CDATA[Reply to Ordnerstrucktur auslessen on Fri, 10 Nov 2006 13:31:20 GMT]]></title><description><![CDATA[<p>jo hab das schon mal ausbrobiert aber ich habe nie ne ausgebe bekommen.<br />
blos mit StringGrid1 aber das ist ja egal er mal wo = 2 soll die Dateien auslessen was erstmal egal ist</p>
<pre><code class="language-cpp">void __fastcall TForm1::Ordner(AnsiString path,int wo){
  if(wo == 1){
	StringGrid1-&gt;RowCount = 0;
		 CheckBox6-&gt;Checked = false;
		 CheckBox7-&gt;Checked = false ;
  }else{
	if(wo == 2){
		StringGrid2-&gt;RowCount = 0;
		CheckBox6-&gt;Checked = true;
		CheckBox7-&gt;Checked = true ;
	}
  }
  if(wo &lt;=2 &amp;&amp; wo &gt; 0){
	 AnsiString Text = path;
	 Text.SetLength(Text.Length()-3);
	 TSearchRec sr;
	 int iAttributes = 0;
	 iAttributes |= faReadOnly * CheckBox1-&gt;Checked;
	 iAttributes |= faHidden * CheckBox2-&gt;Checked;
	 iAttributes |= faSysFile * CheckBox3-&gt;Checked;
	 iAttributes |= faVolumeID * CheckBox4-&gt;Checked;
	 iAttributes |= faDirectory * CheckBox5-&gt;Checked;
	 iAttributes |= faArchive * CheckBox6-&gt;Checked;
	 iAttributes |= faAnyFile * CheckBox7-&gt;Checked;
	 if (FindFirst(path, iAttributes, sr) == 0)
	  {
		do
		{
		  if ((sr.Attr &amp; iAttributes) == sr.Attr)
		  {
				if(wo == 1){
					if(sr.Name != &quot;..&quot; &amp;&amp; sr.Name != &quot;.&quot;){
					StringGrid1-&gt;RowCount = StringGrid1-&gt;RowCount + 1;
					StringGrid1-&gt;Cells[0][StringGrid1-&gt;RowCount-1] = Text+sr.Name;
					Ordner(Text+sr.Name+&quot;\\*.*&quot;,1);
                    }
				}else{
					if(sr.Name != &quot;..&quot; &amp;&amp; sr.Name != &quot;.&quot;){
					AnsiString Test;
					int Test2 = sr.Name.Length()-3;
					Test=sr.Name.SubString(Test2,1);
					if(Test == &quot;.&quot;){
					Label2-&gt;Caption = Test;
						 StringGrid2-&gt;RowCount = StringGrid2-&gt;RowCount + 1;
						 StringGrid2-&gt;Cells[0][StringGrid2-&gt;RowCount-1] = Text+sr.Name;
					}
                    }
				}
		  }
		} while (FindNext(sr) == 0);
		FindClose(sr);
	  }
  }
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1172205</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1172205</guid><dc:creator><![CDATA[Wnerer2005]]></dc:creator><pubDate>Fri, 10 Nov 2006 13:31:20 GMT</pubDate></item></channel></rss>