<?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[Meine Copy &amp;amp; Move Funktionen]]></title><description><![CDATA[<p>Hallo, ich habe hier Funktionen zum Kopieren &amp; Verschieben von Verzeichnissen und Dateien:</p>
<p><strong>Kopieren</strong></p>
<pre><code class="language-cpp">void Copy_Folder(LPCTSTR pszFrom, LPCTSTR pszTo)
{
	SHFILEOPSTRUCT fos = {0};

	fos.wFunc = FO_COPY;
	fos.pFrom = pszFrom; 
	fos.pTo   = pszTo;

	SHFileOperation(&amp;fos); 
}

void Copy_File(LPCTSTR pszFrom, LPCTSTR pszTo)
{
	SHFILEOPSTRUCT fop;

	fop.hwnd   = NULL; 
	fop.wFunc  = FO_COPY; 
	fop.pFrom  = pszFrom; 
	fop.pTo    = pszTo;
	fop.fFlags = FOF_ALLOWUNDO;

	SHFileOperation(&amp;fop); 
}
</code></pre>
<p>**<br />
Verschieben**</p>
<pre><code class="language-cpp">void Move_Folder(LPCTSTR pszFrom, LPCTSTR pszTo)
{
	SHFILEOPSTRUCT fos = {0};

	fos.wFunc = FO_MOVE;
	fos.pFrom = pszFrom; 
	fos.pTo   = pszTo;

	SHFileOperation(&amp;fos); 
}

void Move_File(LPCTSTR pszFrom, LPCTSTR pszTo)
{
	SHFILEOPSTRUCT fos = {0};

	fos.hwnd   = NULL;
	fos.wFunc  = FO_MOVE;
	fos.pFrom  = pszFrom;
	fos.pTo	   = pszTo;
	fos.fFlags = FOF_ALLOWUNDO;

	SHFileOperation(&amp;fos); 
}
</code></pre>
<p>Hat jemand noch Verbesserungsvorschläge und wie kann man bei vorhandenen Dateien die Windows Dialoge ausblenden und diese in der Konsole anzeigen??</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/209929/meine-copy-amp-move-funktionen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 04:52:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/209929.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 04 Apr 2008 21:01:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Meine Copy &amp;amp; Move Funktionen on Fri, 04 Apr 2008 21:02:18 GMT]]></title><description><![CDATA[<p>Hallo, ich habe hier Funktionen zum Kopieren &amp; Verschieben von Verzeichnissen und Dateien:</p>
<p><strong>Kopieren</strong></p>
<pre><code class="language-cpp">void Copy_Folder(LPCTSTR pszFrom, LPCTSTR pszTo)
{
	SHFILEOPSTRUCT fos = {0};

	fos.wFunc = FO_COPY;
	fos.pFrom = pszFrom; 
	fos.pTo   = pszTo;

	SHFileOperation(&amp;fos); 
}

void Copy_File(LPCTSTR pszFrom, LPCTSTR pszTo)
{
	SHFILEOPSTRUCT fop;

	fop.hwnd   = NULL; 
	fop.wFunc  = FO_COPY; 
	fop.pFrom  = pszFrom; 
	fop.pTo    = pszTo;
	fop.fFlags = FOF_ALLOWUNDO;

	SHFileOperation(&amp;fop); 
}
</code></pre>
<p>**<br />
Verschieben**</p>
<pre><code class="language-cpp">void Move_Folder(LPCTSTR pszFrom, LPCTSTR pszTo)
{
	SHFILEOPSTRUCT fos = {0};

	fos.wFunc = FO_MOVE;
	fos.pFrom = pszFrom; 
	fos.pTo   = pszTo;

	SHFileOperation(&amp;fos); 
}

void Move_File(LPCTSTR pszFrom, LPCTSTR pszTo)
{
	SHFILEOPSTRUCT fos = {0};

	fos.hwnd   = NULL;
	fos.wFunc  = FO_MOVE;
	fos.pFrom  = pszFrom;
	fos.pTo	   = pszTo;
	fos.fFlags = FOF_ALLOWUNDO;

	SHFileOperation(&amp;fos); 
}
</code></pre>
<p>Hat jemand noch Verbesserungsvorschläge und wie kann man bei vorhandenen Dateien die Windows Dialoge ausblenden und diese in der Konsole anzeigen??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1486738</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1486738</guid><dc:creator><![CDATA[kernel64]]></dc:creator><pubDate>Fri, 04 Apr 2008 21:02:18 GMT</pubDate></item><item><title><![CDATA[Reply to Meine Copy &amp;amp; Move Funktionen on Sat, 05 Apr 2008 05:50:23 GMT]]></title><description><![CDATA[<p>Wenn du die Bestätigungsdialoge ausblenden willst musst du die entsprecheneden flags setzten, wie z.B. &quot;FOF_NOCONFIRMATION&quot;, aber da gibts ja noch andere. Am besten du schaust mal in die MSDN.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1486803</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1486803</guid><dc:creator><![CDATA[Flag]]></dc:creator><pubDate>Sat, 05 Apr 2008 05:50:23 GMT</pubDate></item><item><title><![CDATA[Reply to Meine Copy &amp;amp; Move Funktionen on Sun, 06 Apr 2008 20:52:39 GMT]]></title><description><![CDATA[<p>Habe eine Rename-Funktion geschrieben, doch irgendwie werden die Dateien nicht umbenannt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<pre><code class="language-cpp">void Rename_File(LPCTSTR pszFrom, LPCTSTR pszTo)
{
	SHFILEOPSTRUCT fos = {0};

	fos.hwnd   = NULL;
	fos.wFunc  = FO_RENAME;
	fos.pFrom  = pszFrom;
	fos.pTo	   = pszTo;
	fos.fFlags = FOF_NOCONFIRMATION|FOF_SILENT;

	SHFileOperation(&amp;fos); 
}

Rename_File(&quot;E:\\test.txt&quot;,  &quot;E:\\blabla.txt&quot;);
</code></pre>
<p>Weiß jemand was falsch ist ??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1487587</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1487587</guid><dc:creator><![CDATA[kernel64]]></dc:creator><pubDate>Sun, 06 Apr 2008 20:52:39 GMT</pubDate></item><item><title><![CDATA[Reply to Meine Copy &amp;amp; Move Funktionen on Mon, 07 Apr 2008 06:47:45 GMT]]></title><description><![CDATA[<p>MoveFile/MoveFileEx ist einfacher und direkter.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1487646</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1487646</guid><dc:creator><![CDATA[sri]]></dc:creator><pubDate>Mon, 07 Apr 2008 06:47:45 GMT</pubDate></item><item><title><![CDATA[Reply to Meine Copy &amp;amp; Move Funktionen on Mon, 07 Apr 2008 08:56:36 GMT]]></title><description><![CDATA[<p>Das verschieben klappt schon, doch ich brauche eine Umbenennen-Funktion, jedoch meine Funktioniert nicht <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1487716</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1487716</guid><dc:creator><![CDATA[kernel64]]></dc:creator><pubDate>Mon, 07 Apr 2008 08:56:36 GMT</pubDate></item><item><title><![CDATA[Reply to Meine Copy &amp;amp; Move Funktionen on Mon, 07 Apr 2008 09:19:54 GMT]]></title><description><![CDATA[<p>MoveFile/MoveFileEx benennt auch um. <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="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1487735</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1487735</guid><dc:creator><![CDATA[sri]]></dc:creator><pubDate>Mon, 07 Apr 2008 09:19:54 GMT</pubDate></item></channel></rss>