<?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[Ordner von A nach B Kopieren.]]></title><description><![CDATA[<p>Hallo ich habe hier ein Programm damit kann ich nur eine Datei vom Qullpfad zum Zielpfad kopieren,</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;fstream&gt;

using namespace std;

int main(int argc, char** argv)
{
    char sourceFile[100], destFile[100], c;

    cout &lt;&lt; &quot;Geben sie den Pfad zu einer Quelldatei an: &quot;;
    cin &gt;&gt; sourceFile;
    cout &lt;&lt; &quot;Geben sie den Pfad zu einer Zieldatei an: &quot;;
    cin &gt;&gt; destFile;

    ifstream source(sourceFile);
    if(source == NULL){
        cerr &lt;&lt; &quot;Kann Quelldatei nicht oeffnen\n&quot;;
        return -1;
    }
    ofstream dest(destFile);
    if(dest == NULL){
        cerr &lt;&lt; &quot;Kann Zieldatei nicht oeffnen\n&quot;;
        return -1;
    }

    while(source.get(c)) dest.put(c);

    return 0;
}
</code></pre>
<p>Wie kann das Programm erweitern damit es mir Ordner, Unterordner und die darin befindlichen Dateien aus dem Quellpfad in den Zielpfad kopiert? Nebenbei soll der Zielpfad auch erstellt werden, wenn er nicht vorhanden ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/194258/ordner-von-a-nach-b-kopieren</link><generator>RSS for Node</generator><lastBuildDate>Mon, 28 Sep 2026 10:10:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/194258.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 04 Oct 2007 15:12:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 15:12:05 GMT]]></title><description><![CDATA[<p>Hallo ich habe hier ein Programm damit kann ich nur eine Datei vom Qullpfad zum Zielpfad kopieren,</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;fstream&gt;

using namespace std;

int main(int argc, char** argv)
{
    char sourceFile[100], destFile[100], c;

    cout &lt;&lt; &quot;Geben sie den Pfad zu einer Quelldatei an: &quot;;
    cin &gt;&gt; sourceFile;
    cout &lt;&lt; &quot;Geben sie den Pfad zu einer Zieldatei an: &quot;;
    cin &gt;&gt; destFile;

    ifstream source(sourceFile);
    if(source == NULL){
        cerr &lt;&lt; &quot;Kann Quelldatei nicht oeffnen\n&quot;;
        return -1;
    }
    ofstream dest(destFile);
    if(dest == NULL){
        cerr &lt;&lt; &quot;Kann Zieldatei nicht oeffnen\n&quot;;
        return -1;
    }

    while(source.get(c)) dest.put(c);

    return 0;
}
</code></pre>
<p>Wie kann das Programm erweitern damit es mir Ordner, Unterordner und die darin befindlichen Dateien aus dem Quellpfad in den Zielpfad kopiert? Nebenbei soll der Zielpfad auch erstellt werden, wenn er nicht vorhanden ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1377998</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1377998</guid><dc:creator><![CDATA[lord_fritte]]></dc:creator><pubDate>Thu, 04 Oct 2007 15:12:05 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 15:17:53 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Mit StandardC++ geht das gar nicht. Du kannst die Funktionen deines Betriebssystems (bei Windows SHFileOperations) oder auch boost::filesystem dafür nutzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378002</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378002</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 04 Oct 2007 15:17:53 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 17:28:07 GMT]]></title><description><![CDATA[<p>Ich habe mir boost_1_34_1 runtergeladen, habe den Ordner boost in meinem Include Ordner von meinem Compiler kopiert.<br />
Das Programm lässt sich aber nicht Compilieren</p>
<pre><code class="language-cpp">#include &lt;boost/filesystem/operations.hpp&gt;
#include &lt;boost/filesystem/path.hpp&gt;
#include &lt;iostream&gt;
using namespace boost::filesystem;

main()
{
    path my_path(&quot;D:\Daten\&quot;);
    if(exists(my_path)){
        cout &lt;&lt; &quot;Verzeichnis vorhanden&quot; &lt;&lt; endl;
    }

    return 0;
}
</code></pre>
<pre><code>-------------- Build: Debug in boostFilesystem ---------------
Linking console executable: bin\Debug\boostFilesystem.exe
obj\Debug\main.o: In function `ZN5boost6detail17sp_counted_impl_pINS_10filesystem22basic_filesystem_errorINS2_10basic_pathISsNS2_11path_traitsEEEE5m_impEED0Ev':D:/Compiler/include/boost/detail/sp_counted_base_gcc_x86.hpp:(.text$_ZN5boost10filesystem6existsERKNS0_10basic_pathISsNS0_11path_traitsEEE[boost::filesystem::exists(boost::filesystem::basic_path&lt;std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, boost::filesystem::path_traits&gt; const&amp;)]+0x72): undefined reference to `boost::filesystem::detail::status_api(std::string const&amp;, unsigned int&amp;)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
</code></pre>
<p>Brauche ich da eine Lib für? Ich verstehe nicht wie ich die bauen soll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378062</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378062</guid><dc:creator><![CDATA[lord_fritte]]></dc:creator><pubDate>Thu, 04 Oct 2007 17:28:07 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 17:28:20 GMT]]></title><description><![CDATA[<p>boost/filesystem/operations.hpp: No such file or directory<br />
Das sollte dir ja sagen was da schiefgeht.<br />
Er findet den Include-Datei einfach nicht.</p>
<pre><code class="language-cpp">path my_path(&quot;D:\Daten\&quot;);
</code></pre>
<p>Aua.<br />
Das Zweite \ maskiert die &quot; <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/26a0.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--warning"
      title=":warning:"
      alt="⚠"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378064</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378064</guid><dc:creator><![CDATA[Mario Sandler]]></dc:creator><pubDate>Thu, 04 Oct 2007 17:28:20 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 17:30:19 GMT]]></title><description><![CDATA[<p>Das muss</p>
<pre><code class="language-cpp">path my_path(&quot;D:\\Daten\\&quot;);
</code></pre>
<p>Also mit 2 &quot;\&quot;.<br />
Ein \ sagt dem Compiler immer dass eine Escape-Sequenz kommt, er sieht also nicht das Zeichen \ sondern die Escape-Sequenz. Das Zeichen \ bekommr indem man \\ schreibt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378065</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378065</guid><dc:creator><![CDATA[Aksel]]></dc:creator><pubDate>Thu, 04 Oct 2007 17:30:19 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 17:41:54 GMT]]></title><description><![CDATA[<p>lord_fritte schrieb:</p>
<blockquote>
<p>Brauche ich da eine Lib für? Ich verstehe nicht wie ich die bauen soll.</p>
</blockquote>
<p>Ja, für filesystem brauchst du eine lib. Es gibt auf der boost Seite Anleitungen zum Bauen der lib. Das ist vom verwendeten Compiler abhängig. Welchen hast du denn?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378073</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378073</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 04 Oct 2007 17:41:54 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 17:53:44 GMT]]></title><description><![CDATA[<p>mingw gcc für Windows 32-bit, also das geht mit dem gjam? naja ich bin gerade am bauen, aber irgendwie baut der das alles für msvc-8.0express.<br />
Also ich habe die Visual C++ Express edition auch installiert, aber damit Compiliere ich nicht.</p>
<p>@ <a href="http://Storm.Xapek.de" rel="nofollow">Storm.Xapek.de</a> + Aksel<br />
Ja ich weiss, ich habe das noch nicht geändert, weils noch unwichtig ist solange das mit der lib nicht geht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378080</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378080</guid><dc:creator><![CDATA[lord_fritte]]></dc:creator><pubDate>Thu, 04 Oct 2007 17:53:44 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 17:55:13 GMT]]></title><description><![CDATA[<p>Hast du auch angegeben, dass du mingw nehemen willst?</p>
<blockquote>
<p>bjam &quot;-sTOOLS=mingw&quot; &quot;-sBUILD=debug release &lt;runtime-link&gt;static/dynamic&quot; &quot;-sMINGW_ROOT_DIRECTORY=d:/mingw&quot; install</p>
</blockquote>
<p>So sieht der bjam Aufruf bei mir aus.<br />
Zudem habe ich noch die user-config.jam in tools\build\v2 geändert.<br />
Dort steht dann bei mir</p>
<blockquote>
<p>using gcc : mingw : d:/mingw/bin/mingw32-g++ : &lt;root&gt;d:\mingw\bin ;</p>
</blockquote>
<p>Alle anderen usings sind auskommentiert.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378089</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378089</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 04 Oct 2007 17:55:13 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 18:17:45 GMT]]></title><description><![CDATA[<p>Ok er läuft jetzt, mal abwarten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378095</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378095</guid><dc:creator><![CDATA[lord_fritte]]></dc:creator><pubDate>Thu, 04 Oct 2007 18:17:45 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 18:18:29 GMT]]></title><description><![CDATA[<p>Vielleicht solltest du dir mal die Ausgabe von &quot;bjam --help&quot; ansehen, da steht alles was du wissen musst.</p>
<p>Und du kannst mal &quot;--toolset=gcc&quot; zu dem bjam-Aufruf hinzufügen.</p>
<p>Aber das ist alles auch <a href="http://boost.org/more/getting_started/windows.html" rel="nofollow">hier</a> erklärt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378103</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378103</guid><dc:creator><![CDATA[The-Kenny]]></dc:creator><pubDate>Thu, 04 Oct 2007 18:18:29 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 18:34:21 GMT]]></title><description><![CDATA[<p>Nur noch eine Frage.. *.lib und *.dll ist doch theoretisch das selbe oder?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378121</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378121</guid><dc:creator><![CDATA[lord_fritte]]></dc:creator><pubDate>Thu, 04 Oct 2007 18:34:21 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 18:36:36 GMT]]></title><description><![CDATA[<p>nein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378124</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378124</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 04 Oct 2007 18:36:36 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 18:49:47 GMT]]></title><description><![CDATA[<p>Tja,.. der baut nur *.ddl dateien aber keine lib's</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378132</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378132</guid><dc:creator><![CDATA[lord_fritte]]></dc:creator><pubDate>Thu, 04 Oct 2007 18:49:47 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 18:44:15 GMT]]></title><description><![CDATA[<p>evtl. sind Dateien die auf .a enden dabei? Das sind ebenfalls libs.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378133</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378133</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 04 Oct 2007 18:44:15 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 18:50:07 GMT]]></title><description><![CDATA[<p>Ja sind vorhanden, es läuft aber irgendwie mit der DLL</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378137</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378137</guid><dc:creator><![CDATA[lord_fritte]]></dc:creator><pubDate>Thu, 04 Oct 2007 18:50:07 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 18:52:01 GMT]]></title><description><![CDATA[<p>Wenn du die filesystem-header mit einbindest werden die dazugehörigen libs meist automatisch mit eingebunden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378141</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378141</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 04 Oct 2007 18:52:01 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner von A nach B Kopieren. on Thu, 04 Oct 2007 19:21:27 GMT]]></title><description><![CDATA[<p>Also er Compiliert jetzt ohne zu motzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1378150</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1378150</guid><dc:creator><![CDATA[lord_fritte]]></dc:creator><pubDate>Thu, 04 Oct 2007 19:21:27 GMT</pubDate></item></channel></rss>