<?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[Datei kopieren?]]></title><description><![CDATA[<p>Hat jemand eine Ahnung, wie ich eine Datei kopieren kann?<br />
Ich habs mal so ausprobiert.</p>
<pre><code class="language-cpp">AnsiString path = ExtractFilePath(Application-&gt;ExeName);
  CopyFile(path.c_str, &quot;C:\test&quot;);
</code></pre>
<p>[C++ Fehler] Unit1.cpp(16): E2034 Konvertierung von 'char * (_fastcall * (_closure )())()' nach 'const char *' nicht möglich<br />
[C++ Fehler] Unit1.cpp(16): E2342 Keine Übereinstimmung des Typs beim Parameter 'lpExistingFileName' ('const char *' erwartet, 'void' erhalten)<br />
[C++ Fehler] Unit1.cpp(16): E2193 Zu wenige Parameter im Aufruf von '__stdcall CopyFileA(const char *,const char *,int)'</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/123064/datei-kopieren</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Jul 2026 02:16:04 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/123064.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 12 Oct 2005 15:03:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Datei kopieren? on Wed, 12 Oct 2005 15:03:17 GMT]]></title><description><![CDATA[<p>Hat jemand eine Ahnung, wie ich eine Datei kopieren kann?<br />
Ich habs mal so ausprobiert.</p>
<pre><code class="language-cpp">AnsiString path = ExtractFilePath(Application-&gt;ExeName);
  CopyFile(path.c_str, &quot;C:\test&quot;);
</code></pre>
<p>[C++ Fehler] Unit1.cpp(16): E2034 Konvertierung von 'char * (_fastcall * (_closure )())()' nach 'const char *' nicht möglich<br />
[C++ Fehler] Unit1.cpp(16): E2342 Keine Übereinstimmung des Typs beim Parameter 'lpExistingFileName' ('const char *' erwartet, 'void' erhalten)<br />
[C++ Fehler] Unit1.cpp(16): E2193 Zu wenige Parameter im Aufruf von '__stdcall CopyFileA(const char *,const char *,int)'</p>
]]></description><link>https://www.c-plusplus.net/forum/post/890749</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890749</guid><dc:creator><![CDATA[milo51]]></dc:creator><pubDate>Wed, 12 Oct 2005 15:03:17 GMT</pubDate></item><item><title><![CDATA[Reply to Datei kopieren? on Wed, 12 Oct 2005 15:08:22 GMT]]></title><description><![CDATA[<p>Versuch doch einfach mal, die Fehlermeldungen auszulegen, so schwer sind die ja nicht zu verstehen.</p>
<p>Aber ich befürchte, dein ganzer Ansatz ist hoffnungslos verkehrt...<br />
Wenn du ein Verzeichnis kopieren willst, dann würde ich es nicht mit Copy<strong>File()</strong> versuchen, und wie ruft man Funktionen auf?</p>
<p>Und eib Blick ins Thema Escape Sequenzen könnte auch nicht schaden...</p>
<p>Wenn du eine Datei kopieren willst, was fingerst du dann da groß mit ExtractFile<strong>Path()</strong> rum?</p>
<pre><code class="language-cpp">CopyFile(FileName, NewFile, OverwriteIfExists)
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/890750</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890750</guid><dc:creator><![CDATA[Reyx]]></dc:creator><pubDate>Wed, 12 Oct 2005 15:08:22 GMT</pubDate></item><item><title><![CDATA[Reply to Datei kopieren? on Wed, 12 Oct 2005 15:52:14 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Zum Kopieren von Verzeichnissen etc. gibt es doch einen <a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39283" rel="nofollow">FAQ-Beitrag</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/890785</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890785</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Wed, 12 Oct 2005 15:52:14 GMT</pubDate></item><item><title><![CDATA[Reply to Datei kopieren? on Wed, 12 Oct 2005 20:29:54 GMT]]></title><description><![CDATA[<p>1. Doch für mich sind die Fehlermeldungen schwer zu verstehen...ich hab nicht viel Ahnung von allem dem, vor allem mit chars tu ich mich immer schwer, versteh die eh nie so richtig...kp warum</p>
<p>Außerdem will ich kein Verzeichnis kopieren sondern eine Datei.</p>
<p>Und ExtractFilePath brauch ich, da das Programm doch gar nicht weiß, wo sich das zu kopierende Programm befindet. Denn ich will die .exe ja auch weitergeben und ich kann jetzt doch nicht wissen, wo sie jemand hinpacken wird.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/890922</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890922</guid><dc:creator><![CDATA[milo51]]></dc:creator><pubDate>Wed, 12 Oct 2005 20:29:54 GMT</pubDate></item><item><title><![CDATA[Reply to Datei kopieren? on Wed, 12 Oct 2005 21:04:01 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>1. Du must nicht nur den Pfad bestimmen, sondern noch einen Dateinamen anhängen.<br />
2. c_str() ist eine Methode und deshalb müßen da Klammern dran<br />
3. <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/copyfile.asp" rel="nofollow">CopyFile</a> hat noch einen weiteren Parameter.</p>
<pre><code class="language-cpp">AnsiString path = ExtractFilePath(Application-&gt;ExeName);
path += &quot;Filename&quot;;
CopyFile(path.c_str(), &quot;C:\test&quot;, false);
</code></pre>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/890932</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/890932</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 12 Oct 2005 21:04:01 GMT</pubDate></item><item><title><![CDATA[Reply to Datei kopieren? on Thu, 13 Oct 2005 12:48:34 GMT]]></title><description><![CDATA[<p>Danke klappt super.</p>
<p>Wofür steht denn der 3 Parameter? Ob er bei vorhandener Datei abrechen soll oder was?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/891339</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891339</guid><dc:creator><![CDATA[milo51]]></dc:creator><pubDate>Thu, 13 Oct 2005 12:48:34 GMT</pubDate></item><item><title><![CDATA[Reply to Datei kopieren? on Thu, 13 Oct 2005 13:12:42 GMT]]></title><description><![CDATA[<p>Wenn nicht schon der Name des Parameters beim Öffnen der Klammer erscheint, kannst du das ansonsten ganz leicht in der MSDN nachschauen: <a href="https://www.google.de/search?&amp;q=site%3Amsdn.microsoft.com%20CopyFile" rel="nofollow">Google: site:msdn.microsoft.com CopyFile</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/891369</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891369</guid><dc:creator><![CDATA[HEZ]]></dc:creator><pubDate>Thu, 13 Oct 2005 13:12:42 GMT</pubDate></item><item><title><![CDATA[Reply to Datei kopieren? on Thu, 13 Oct 2005 13:50:50 GMT]]></title><description><![CDATA[<p>Ach so alles klar, overwrite, hab ja fast richtig geraten <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/891409</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/891409</guid><dc:creator><![CDATA[milo51]]></dc:creator><pubDate>Thu, 13 Oct 2005 13:50:50 GMT</pubDate></item></channel></rss>