<?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 kopieren]]></title><description><![CDATA[<p>hi</p>
<p>ich will einen Ordner in einen anderen Kopieren:</p>
<p>hier der Code:</p>
<pre><code class="language-cpp">tmp = tmpnam(NULL);		
		filename = &quot;&quot;;
		filename = temp + &quot;\\&quot; + data.cFileName;
		t_filename = temp + &quot;tmp&quot;;

		sprintf(text, &quot;%d %d&quot;, data.dwFileAttributes, FILE_ATTRIBUTE_DIRECTORY);
		//MessageBox(NULL, filename + &quot; + &quot; + CString(text), CString(&quot;s2&quot;) , MB_ICONINFORMATION);
		//printf(&quot;%s\n&quot;, tmp);
		if (data.dwFileAttributes &amp; FILE_ATTRIBUTE_DIRECTORY)
		{
			SHFILEOPSTRUCT shFileCopy;

			memset(&amp;shFileCopy, 0, sizeof(shFileCopy));

			shFileCopy.wFunc = FO_COPY;
			shFileCopy.fFlags = FOF_SIMPLEPROGRESS | FOF_NOCONFIRMATION;
			shFileCopy.fAnyOperationsAborted = TRUE;
			shFileCopy.lpszProgressTitle = CString(&quot;Kopieren...&quot;);
			shFileCopy.pFrom = filename;
			shFileCopy.pTo = t_filename;

			SHFileOperation(&amp;shFileCopy);
		}
</code></pre>
<p>Wenn ich jetzt mein Programm ausführe bekomm ich immer eine Fehlermeldung dass die Datei nicht gelesen werden kann.</p>
<p>in filename steht der zu kopierende Ordner so:</p>
<p>C:\\test1\1</p>
<p>in t_filename dann<br />
C:\\test1\1tmp</p>
<p>Warum kopiert der jetzt den Ordner nicht in den t_filename Ordner?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/79523/ordner-kopieren</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 20:09:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/79523.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Jul 2004 09:43:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ordner kopieren on Mon, 12 Jul 2004 09:43:55 GMT]]></title><description><![CDATA[<p>hi</p>
<p>ich will einen Ordner in einen anderen Kopieren:</p>
<p>hier der Code:</p>
<pre><code class="language-cpp">tmp = tmpnam(NULL);		
		filename = &quot;&quot;;
		filename = temp + &quot;\\&quot; + data.cFileName;
		t_filename = temp + &quot;tmp&quot;;

		sprintf(text, &quot;%d %d&quot;, data.dwFileAttributes, FILE_ATTRIBUTE_DIRECTORY);
		//MessageBox(NULL, filename + &quot; + &quot; + CString(text), CString(&quot;s2&quot;) , MB_ICONINFORMATION);
		//printf(&quot;%s\n&quot;, tmp);
		if (data.dwFileAttributes &amp; FILE_ATTRIBUTE_DIRECTORY)
		{
			SHFILEOPSTRUCT shFileCopy;

			memset(&amp;shFileCopy, 0, sizeof(shFileCopy));

			shFileCopy.wFunc = FO_COPY;
			shFileCopy.fFlags = FOF_SIMPLEPROGRESS | FOF_NOCONFIRMATION;
			shFileCopy.fAnyOperationsAborted = TRUE;
			shFileCopy.lpszProgressTitle = CString(&quot;Kopieren...&quot;);
			shFileCopy.pFrom = filename;
			shFileCopy.pTo = t_filename;

			SHFileOperation(&amp;shFileCopy);
		}
</code></pre>
<p>Wenn ich jetzt mein Programm ausführe bekomm ich immer eine Fehlermeldung dass die Datei nicht gelesen werden kann.</p>
<p>in filename steht der zu kopierende Ordner so:</p>
<p>C:\\test1\1</p>
<p>in t_filename dann<br />
C:\\test1\1tmp</p>
<p>Warum kopiert der jetzt den Ordner nicht in den t_filename Ordner?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/558668</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/558668</guid><dc:creator><![CDATA[housefreak]]></dc:creator><pubDate>Mon, 12 Jul 2004 09:43:55 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Mon, 12 Jul 2004 11:43:06 GMT]]></title><description><![CDATA[<blockquote>
<p>An additional NULL character must be appended to the end of the final name to indicate the end of pFrom.</p>
</blockquote>
<p>Außerdem weiß ich nicht genau, ob du direkt ein Verzeichnis angeben kannst - nimm lieber Wildcards:</p>
<pre><code>Standard Microsoft® MS-DOS® wild cards, such as &quot;*&quot;, are permitted in the file-name position.
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/558749</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/558749</guid><dc:creator><![CDATA[flenders]]></dc:creator><pubDate>Mon, 12 Jul 2004 11:43:06 GMT</pubDate></item></channel></rss>