<?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[Dateien verschieben Alternative]]></title><description><![CDATA[<p>Hallo, ich suche eine Alternativlösung um Dateien mit C/C++ zu verschieben. MoveFile() möchte ich nicht benutzen, da es nicht einwandfrei zu funktionieren scheint, vor allem bei .zip o.ä. Dateiarten. Falls es sogar eine extra Funktion dafür im BCB gibt, kann die auch genannt werden, da ich mit dem BCB arbeite, aber eine andere WINAPI oder C Funktion wäre auch okay.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/185406/dateien-verschieben-alternative</link><generator>RSS for Node</generator><lastBuildDate>Sun, 05 Jul 2026 16:08:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/185406.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 Jun 2007 11:55:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dateien verschieben Alternative on Mon, 25 Jun 2007 11:55:37 GMT]]></title><description><![CDATA[<p>Hallo, ich suche eine Alternativlösung um Dateien mit C/C++ zu verschieben. MoveFile() möchte ich nicht benutzen, da es nicht einwandfrei zu funktionieren scheint, vor allem bei .zip o.ä. Dateiarten. Falls es sogar eine extra Funktion dafür im BCB gibt, kann die auch genannt werden, da ich mit dem BCB arbeite, aber eine andere WINAPI oder C Funktion wäre auch okay.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313268</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313268</guid><dc:creator><![CDATA[Schlurmann]]></dc:creator><pubDate>Mon, 25 Jun 2007 11:55:37 GMT</pubDate></item><item><title><![CDATA[Reply to Dateien verschieben Alternative on Mon, 25 Jun 2007 13:57:58 GMT]]></title><description><![CDATA[<p>MoveFileEx?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313379</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313379</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Mon, 25 Jun 2007 13:57:58 GMT</pubDate></item><item><title><![CDATA[Reply to Dateien verschieben Alternative on Mon, 25 Jun 2007 14:00:41 GMT]]></title><description><![CDATA[<p>Das kommt doch auf's selbe raus...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313382</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313382</guid><dc:creator><![CDATA[Schlurmann]]></dc:creator><pubDate>Mon, 25 Jun 2007 14:00:41 GMT</pubDate></item><item><title><![CDATA[Reply to Dateien verschieben Alternative on Mon, 25 Jun 2007 14:03:37 GMT]]></title><description><![CDATA[<p>Wie genau äußert sich dieses &quot;funktioniert nicht einwandfrei&quot;?</p>
<p>PS: Ich hätte da noch ShFileOperation() oder rename() anzubieten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313386</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313386</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Mon, 25 Jun 2007 14:03:37 GMT</pubDate></item><item><title><![CDATA[Reply to Dateien verschieben Alternative on Mon, 25 Jun 2007 14:39:09 GMT]]></title><description><![CDATA[<p>rename() kann doch aber keine Dateien verschieben oder?</p>
<p>Ich bin nun schon etwas weiter, ich hab mir mal den ErrorCode ausgeben lassen und entweder ist das File nach Code schon vorhanden oder das File/Zielverzeichnis konnte nicht gefunden werden.</p>
<p>Komischerweise funktioniert das ganze mit einer .rar Datei, eine .zip Datei allerdings wird nicht verschoben und liefert Error Code 2 ...</p>
<p>Ich denk mal es hängt mit dem Pfad zusammen, den ich einlese, denn der ist dann noch in der Form D:\bla\bla</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313418</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313418</guid><dc:creator><![CDATA[Schlurmann]]></dc:creator><pubDate>Mon, 25 Jun 2007 14:39:09 GMT</pubDate></item><item><title><![CDATA[Reply to Dateien verschieben Alternative on Mon, 25 Jun 2007 15:27:34 GMT]]></title><description><![CDATA[<p>Ich denke da hast du bei dir irgendnen Fehler drin <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=";D"
      alt="😉"
    /></p>
<p>Achso:</p>
<p>msdn schrieb:</p>
<blockquote>
<p>The one caveat is that the MoveFile function will fail on directory moves when the destination is on a different volume.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1313453</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313453</guid><dc:creator><![CDATA[geeky]]></dc:creator><pubDate>Mon, 25 Jun 2007 15:27:34 GMT</pubDate></item><item><title><![CDATA[Reply to Dateien verschieben Alternative on Mon, 25 Jun 2007 15:32:43 GMT]]></title><description><![CDATA[<p>Ne ne, darauf hab ich schon acht gegeben.</p>
<p>Ich geb euch einfach mal ein Beispiel:</p>
<pre><code class="language-cpp">AnsiString alt = &quot;\\&quot;;
	AnsiString neu = &quot;\\\\&quot;;
	 OrigPfadEdited = StringReplace(DirectoryListBox1-&gt;Directory, alt, neu, TReplaceFlags() &lt;&lt; rfReplaceAll);
	 ZielPart1Zip = &quot;D:\\Neuer Ordner\\&quot;;
	 PfadZip = &quot;\\*.zip&quot;;

	 OrigPfadSucheZip = DirectoryListBox1-&gt;Directory + PfadZip;
	 SuchPfadStringZip = OrigPfadSucheZip.c_str ();
	 ZielZip = ZielPart1Zip + FDataZip.cFileName;
	 ZielStringZip = ZielZip.c_str ();

	 hSearchZip = FindFirstFile(SuchPfadStringZip,&amp;FDataZip);

	 OrigPfadfiledZip = OrigPfadEdited + neu + FDataZip.cFileName;
	 OriginalPfadZip = OrigPfadfiledZip.c_str ();
	 ZipCheck = true;
	 Edit1-&gt;Text = OriginalPfadZip;
</code></pre>
<p>und eben</p>
<pre><code class="language-cpp">if(RarCheck)
	{
	if(MoveFileEx (OriginalPfadRar, ZielStringRar, MOVEFILE_WRITE_THROUGH))
	{
		Edit1-&gt;Text = &quot;Funzte!&quot;;
	}else
	{
		Edit1-&gt;Text = GetLastError();
	}
	}else if(ZipCheck)
	{
	MoveFileEx (OriginalPfadZip, ZielStringZip, MOVEFILE_WRITE_THROUGH);
	}else
	{
	MessageBox (NULL, &quot;Kein Dateityp ausgewählt&quot;, &quot;Fehler&quot;, MB_OK);
	}
</code></pre>
<p>Bitte keine grundlegenden Sachen beurteilen, ich wollte natürlich noch Variablen die ich nicht brauche rausnehmen, deshalb ist auch alles ein bisschen schwierig zu lesen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313457</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313457</guid><dc:creator><![CDATA[Schlurmann]]></dc:creator><pubDate>Mon, 25 Jun 2007 15:32:43 GMT</pubDate></item><item><title><![CDATA[Reply to Dateien verschieben Alternative on Mon, 25 Jun 2007 15:43:51 GMT]]></title><description><![CDATA[<blockquote>
<pre><code class="language-cpp">OrigPfadEdited = StringReplace(DirectoryListBox1-&gt;Directory, alt, neu, TReplaceFlags() &lt;&lt; rfReplaceAll);
</code></pre>
</blockquote>
<p>Unnötig / Falsch</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313468</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313468</guid><dc:creator><![CDATA[.........]]></dc:creator><pubDate>Mon, 25 Jun 2007 15:43:51 GMT</pubDate></item><item><title><![CDATA[Reply to Dateien verschieben Alternative on Mon, 25 Jun 2007 20:25:20 GMT]]></title><description><![CDATA[<p>Kam mir auch falsch vor das zu machen, da es bei .rar auch ohne funktioniert, aber ich wollte alles ausprobieren. Für .rar sieht der Code kaum anders aus, es klappt aber auch nur bei wenigen .rars.</p>
<pre><code class="language-cpp">AnsiString Füller = &quot;\\&quot;;
		ZielPart1Rar = &quot;D:\\FR\\&quot;;
		PfadRar = &quot;\\*.rar&quot;;
		OrigPfadSucheRar = DirectoryListBox1-&gt;Directory + PfadRar;
		SuchPfadStringRar = OrigPfadSucheRar.c_str ();
		ZielRar = ZielPart1Rar + FDataRar.cFileName;
		ZielStringRar = ZielRar.c_str ();

		hSearchRar = FindFirstFile(SuchPfadStringRar,&amp;FDataRar);

		OrigPfadfiledRar = DirectoryListBox1-&gt;Directory + Füller + FDataRar.cFileName;
		OriginalPfadRar = OrigPfadfiledRar.c_str ();
		RarCheck = true;
		Edit1-&gt;Text = OriginalPfadRar;
</code></pre>
<p>Edit: So passts jetzt bei den .rars zumindest.</p>
<p>Edit: So funktioniert soweit jetzt alles, danke.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1313473</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1313473</guid><dc:creator><![CDATA[Professor Schlurmann]]></dc:creator><pubDate>Mon, 25 Jun 2007 20:25:20 GMT</pubDate></item></channel></rss>