<?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[file.SetFilePath]]></title><description><![CDATA[<p>Hi</p>
<p>Ich habe in einem Programm einige Dateien, die ich mitprotokollieren möchte (Logfiles, Statistiken, ect.). Dafür nutze ich die CFile-Klasse. Ich würde gerne in meinem Ordner einen Unterordner &quot;Logfile&quot; anlegen, in dem die Klasse mit meine Logfiledaten schreibt. Eingentlich müsste das mit folgendem Code gehen:</p>
<p>file.SetFilePath(&quot;Dateipfad&quot;);</p>
<p>Wenn ich jetzt den Pfad absolut angebe (&quot;C:/Logfile&quot;) funktioniert es nicht.<br />
Wenn ich den Pfad relativ angebe (&quot;Logfile/&quot; oder &quot;/Logfile/&quot;) um in meinem Programmpfad zu bleiben funktioniert auch nichts. Wie wendet man dieses</p>
<p>file.SetFilePath</p>
<p>richtig an?</p>
<p>Danke für Deine Hilfe!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/149974/file-setfilepath</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 07:15:22 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/149974.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Jun 2006 06:24:40 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to file.SetFilePath on Mon, 12 Jun 2006 06:24:40 GMT]]></title><description><![CDATA[<p>Hi</p>
<p>Ich habe in einem Programm einige Dateien, die ich mitprotokollieren möchte (Logfiles, Statistiken, ect.). Dafür nutze ich die CFile-Klasse. Ich würde gerne in meinem Ordner einen Unterordner &quot;Logfile&quot; anlegen, in dem die Klasse mit meine Logfiledaten schreibt. Eingentlich müsste das mit folgendem Code gehen:</p>
<p>file.SetFilePath(&quot;Dateipfad&quot;);</p>
<p>Wenn ich jetzt den Pfad absolut angebe (&quot;C:/Logfile&quot;) funktioniert es nicht.<br />
Wenn ich den Pfad relativ angebe (&quot;Logfile/&quot; oder &quot;/Logfile/&quot;) um in meinem Programmpfad zu bleiben funktioniert auch nichts. Wie wendet man dieses</p>
<p>file.SetFilePath</p>
<p>richtig an?</p>
<p>Danke für Deine Hilfe!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1075942</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1075942</guid><dc:creator><![CDATA[Stefan_Walter]]></dc:creator><pubDate>Mon, 12 Jun 2006 06:24:40 GMT</pubDate></item><item><title><![CDATA[Reply to file.SetFilePath on Mon, 12 Jun 2006 07:03:01 GMT]]></title><description><![CDATA[<p>So gar nicht!<br />
SetFilePath ist nur dazu gedacht den Dateinamen an das CFile Objekt zu übergeben, wenn das CFile Object über einen HANDLE erzeugt wurde. In diesem Fall steht ja kein Name zur Verfügung.<br />
Es dient nicht dazu einen Pfad vorab festzulegen.</p>
<p>Du musst immer den gesamten Pfad+Namen mit angeben beim öffnen!<br />
Zudem würde das sowieso nicht so gehen, denn Du möchtest ja das alle Deine Logfiles im selben Pfad landen, dazu wäre eine statische Funktion nötig. SetFilePath ist aber nicht statisch.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1075957</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1075957</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Mon, 12 Jun 2006 07:03:01 GMT</pubDate></item><item><title><![CDATA[Reply to file.SetFilePath on Mon, 12 Jun 2006 07:05:28 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/35992">@Martin</a> Richter<br />
Warst schneller wie ich. Hier noch der Link aus der MSDN <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="😉"
    /><br />
<a href="http://msdn2.microsoft.com/zh-tw/library/3fst6b25.aspx" rel="nofollow">http://msdn2.microsoft.com/zh-tw/library/3fst6b25.aspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1075958</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1075958</guid><dc:creator><![CDATA[guenni81]]></dc:creator><pubDate>Mon, 12 Jun 2006 07:05:28 GMT</pubDate></item><item><title><![CDATA[Reply to file.SetFilePath on Mon, 12 Jun 2006 07:31:43 GMT]]></title><description><![CDATA[<p>Ist es denn irgendwie anders möglich statisch Ordner anzugeben?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1075979</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1075979</guid><dc:creator><![CDATA[Stefan_Walter]]></dc:creator><pubDate>Mon, 12 Jun 2006 07:31:43 GMT</pubDate></item><item><title><![CDATA[Reply to file.SetFilePath on Mon, 12 Jun 2006 07:40:15 GMT]]></title><description><![CDATA[<p>Du musst wie Martin Richter schon sagte den kompletten Pfad + Dateiname im Konstruktor von CFile angeben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1075989</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1075989</guid><dc:creator><![CDATA[guenni81]]></dc:creator><pubDate>Mon, 12 Jun 2006 07:40:15 GMT</pubDate></item><item><title><![CDATA[Reply to file.SetFilePath on Mon, 12 Jun 2006 08:03:13 GMT]]></title><description><![CDATA[<p>hab ich wohl übersehen, jetzt klappts, danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1075998</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1075998</guid><dc:creator><![CDATA[Stefan_Walter]]></dc:creator><pubDate>Mon, 12 Jun 2006 08:03:13 GMT</pubDate></item></channel></rss>