<?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[Batch datei erstellen via BCB6]]></title><description><![CDATA[<p>Hi @ all!</p>
<p>Ich habe eine grafische Oberfläche in BCB6 gemacht, nun möchte ich dass wenn zB Button1 geklickt wird folgender Text in eine *.cmd datei geschrieben wird:</p>
<p>@ /</p>
<p>&quot;c:\blab\bla\bla.bla&quot; /bla bla_bla /bla</p>
<p>bla=c:blab\bla</p>
<p>bla %bla% /bla /bla &quot;bla&quot; /bla</p>
<p>%bla%\023 /bla &quot;bla...&quot; /bla<br />
bla %bla%\353 /bla &quot;%systemdrive%\bla\bla\bla.bla&quot; /bla</p>
<p>Ich habe leider keine Ahnung wie ich das umsetzen kann, vorallem mit den Steuer- und Sonderzeichen und den Absätzen...</p>
<p>Hoffe ihr könnt mir da weiter helfen.</p>
<p>greez</p>
<p>Weedy</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/129763/batch-datei-erstellen-via-bcb6</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Jul 2026 18:26:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/129763.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Dec 2005 14:06:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Fri, 16 Dec 2005 14:06:37 GMT]]></title><description><![CDATA[<p>Hi @ all!</p>
<p>Ich habe eine grafische Oberfläche in BCB6 gemacht, nun möchte ich dass wenn zB Button1 geklickt wird folgender Text in eine *.cmd datei geschrieben wird:</p>
<p>@ /</p>
<p>&quot;c:\blab\bla\bla.bla&quot; /bla bla_bla /bla</p>
<p>bla=c:blab\bla</p>
<p>bla %bla% /bla /bla &quot;bla&quot; /bla</p>
<p>%bla%\023 /bla &quot;bla...&quot; /bla<br />
bla %bla%\353 /bla &quot;%systemdrive%\bla\bla\bla.bla&quot; /bla</p>
<p>Ich habe leider keine Ahnung wie ich das umsetzen kann, vorallem mit den Steuer- und Sonderzeichen und den Absätzen...</p>
<p>Hoffe ihr könnt mir da weiter helfen.</p>
<p>greez</p>
<p>Weedy</p>
]]></description><link>https://www.c-plusplus.net/forum/post/943547</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/943547</guid><dc:creator><![CDATA[weedhead87]]></dc:creator><pubDate>Fri, 16 Dec 2005 14:06:37 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Fri, 16 Dec 2005 14:55:19 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>zum Schreiben in Dateien siehe in die BCB_FAQ hier im Forum, in die TOP3 ganz oben.<br />
zu Sonderzeichen : bis auf die Backslash kannst du alles so wie es über Code speichern, die Backslashes selber must du verdoppeln, um die korrekte Escapesequenz zu bekommen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/943595</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/943595</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Fri, 16 Dec 2005 14:55:19 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Fri, 16 Dec 2005 15:29:10 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>ganz primitiv und schnell kannst Du das Problem so lösen:<br />
Du fügst eine Memokomponente dem Projekt hinzu.</p>
<p>bei Deinem ButtonClick - Ereignis schreibst Du dann in der Art :</p>
<p>Memo1-&gt;Clear();<br />
Memo1-&gt;Lines-&gt;Add(&quot;c:&quot;);<br />
Memo1-&gt;Lines-&gt;Add(&quot;cd windows&quot;);<br />
Memo1-&gt;Lines-&gt;Add(&quot;dir/p&quot;);</p>
<p>Memo1-&gt;Lines-&gt;SaveToFile(&quot;c:\temp.bat&quot;);</p>
<p>das spart Dir die Dateiarbeit ist aber auch nicht die eleganteste Lösung</p>
]]></description><link>https://www.c-plusplus.net/forum/post/943630</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/943630</guid><dc:creator><![CDATA[Rostfrei**]]></dc:creator><pubDate>Fri, 16 Dec 2005 15:29:10 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Fri, 16 Dec 2005 15:38:49 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/10447">@Rostfrei</a> : Statt der Memo-Komponente lieber eine TStringList nehmen, wie es in der FAQ auch beschrieben wird. Der Rest stimmt aber.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/943635</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/943635</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Fri, 16 Dec 2005 15:38:49 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Fri, 16 Dec 2005 15:46:12 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/7971">@akari</a></p>
<p>Stimmt; ist noch schneller und weniger primitiv, also auch eleganter!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/943643</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/943643</guid><dc:creator><![CDATA[Rostfrei**]]></dc:creator><pubDate>Fri, 16 Dec 2005 15:46:12 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Fri, 16 Dec 2005 18:04:49 GMT]]></title><description><![CDATA[<p>thx für die antworten, wie bekomm ich bei der memo methode die anführungszeichen in die datei ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/943740</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/943740</guid><dc:creator><![CDATA[weedhead87]]></dc:creator><pubDate>Fri, 16 Dec 2005 18:04:49 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Fri, 16 Dec 2005 18:08:17 GMT]]></title><description><![CDATA[<p>ok habs geraft \&quot; ^^hehe steuerzeichen^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/943742</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/943742</guid><dc:creator><![CDATA[weedhead87]]></dc:creator><pubDate>Fri, 16 Dec 2005 18:08:17 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Fri, 16 Dec 2005 23:09:22 GMT]]></title><description><![CDATA[<p>danke nochma für eure hilfe, hat alles wunderbar geklappt, und reicht mir erst ma mit dem Memo, müsst nur noch das memo verstecken, aber das wird schon klappen memo1-&gt;hide() oder so denk ich ma...</p>
<p>weedy</p>
]]></description><link>https://www.c-plusplus.net/forum/post/943965</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/943965</guid><dc:creator><![CDATA[weedhead87]]></dc:creator><pubDate>Fri, 16 Dec 2005 23:09:22 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Fri, 16 Dec 2005 23:36:52 GMT]]></title><description><![CDATA[<p>weedhead87 schrieb:</p>
<blockquote>
<p>danke nochma für eure hilfe, hat alles wunderbar geklappt, und reicht mir erst ma mit dem Memo, müsst nur noch das memo verstecken, aber das wird schon klappen memo1-&gt;hide() oder so denk ich ma...</p>
</blockquote>
<p>Warum so ne Fummellösung mit hide() wenns mit TStringList (wie akari bereits sagte) besser ist?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/943984</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/943984</guid><dc:creator><![CDATA[Silencium]]></dc:creator><pubDate>Fri, 16 Dec 2005 23:36:52 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Fri, 16 Dec 2005 23:39:36 GMT]]></title><description><![CDATA[<p>bin anfänger, und habs gern einfach mit dem anderen hab ich mich net auseinander gesetzt, bi erstmal froh das es läuft</p>
]]></description><link>https://www.c-plusplus.net/forum/post/943988</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/943988</guid><dc:creator><![CDATA[weedhead87]]></dc:creator><pubDate>Fri, 16 Dec 2005 23:39:36 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Sat, 17 Dec 2005 00:23:12 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Falls Du es doch nach akaris Art machen willst:</p>
<blockquote>
<p>TStringList* myStringList = new TStringList;<br />
myStringList-&gt;Add(&quot;C:&quot;);<br />
myStringList-&gt;Add(&quot;dir/p&quot;);<br />
myStringList-&gt;SaveToFile(&quot;C:\\test.bat&quot;);</p>
</blockquote>
<p>Gruss Rostfrei[]</p>
]]></description><link>https://www.c-plusplus.net/forum/post/944001</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/944001</guid><dc:creator><![CDATA[Rostfrei**]]></dc:creator><pubDate>Sat, 17 Dec 2005 00:23:12 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Sat, 17 Dec 2005 01:16:23 GMT]]></title><description><![CDATA[<p>aber nicht vergessen, nach dem SaveToFile auch wieder aufzuräumen... wir wollen doch keine speicherlecks - das wäre alles andere als elegant ^^</p>
<pre><code class="language-cpp">delete myStringList;
</code></pre>
<p>ich nehme an, du willst die batch danach auch ausführen? das würdest du dann zB mit ShellExecute machen:</p>
<pre><code class="language-cpp">ShellExecute(NULL,&quot;open&quot;,&quot;C:\\test.bat&quot;,NULL,&quot;C:\\&quot;,SW_SHOWNORMAL);
</code></pre>
<p>oder wenn keine dos-box während der ausführung angezeigt werden soll:</p>
<pre><code class="language-cpp">ShellExecute(NULL,&quot;open&quot;,&quot;C:\\test.bat&quot;,NULL,&quot;C:\\&quot;,SW_HIDE);
</code></pre>
<p>cya</p>
<p>AlgoMan</p>
]]></description><link>https://www.c-plusplus.net/forum/post/944010</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/944010</guid><dc:creator><![CDATA[AlgorithMan]]></dc:creator><pubDate>Sat, 17 Dec 2005 01:16:23 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Sat, 17 Dec 2005 07:47:30 GMT]]></title><description><![CDATA[<p>das iss ja heftig hier, echt kollegial wie ihr mir helft, hätt ich so nicht erwartet...thx 4 this</p>
<p>mh ich hab das mit winexec gemacht:</p>
<p>//Memo Inhalt in Datei schreiben<br />
Memo1-&gt;Lines-&gt;SaveToFile(&quot;c:\\temp.cmd&quot;);<br />
<a href="//temp.cmd">//temp.cmd</a> aufrufen<br />
WinExec(&quot;C:\\temp.cmd&quot;,SW_SHOWNORMAL) ;<br />
//10sec Pause<br />
Sleep(10000);<br />
//Neustarten<br />
WinExec(&quot;shutdown -r -t 1&quot;,SW_SHOWNORMAL) ;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/944053</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/944053</guid><dc:creator><![CDATA[weedhead87]]></dc:creator><pubDate>Sat, 17 Dec 2005 07:47:30 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Sat, 17 Dec 2005 09:59:20 GMT]]></title><description><![CDATA[<p>WinExec sollte nicht mehr benutzt werden</p>
<p>Siehe stattdessen:</p>
<p><a href="http://www.marquardtnet.info/cecke/quickies.1/1_quicky_18.html" rel="nofollow">http://www.marquardtnet.info/cecke/quickies.1/1_quicky_18.html</a><br />
oder<br />
<a href="http://www.marquardtnet.info/cecke/quickies.1/1_quicky_25.html" rel="nofollow">http://www.marquardtnet.info/cecke/quickies.1/1_quicky_25.html</a></p>
<p>Auch der Shutdown kann unter XP Probleme bringen:</p>
<p><a href="http://www.marquardtnet.info/cecke/quickies.1/1_quicky_13.html" rel="nofollow">http://www.marquardtnet.info/cecke/quickies.1/1_quicky_13.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/944088</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/944088</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sat, 17 Dec 2005 09:59:20 GMT</pubDate></item><item><title><![CDATA[Reply to Batch datei erstellen via BCB6 on Sat, 17 Dec 2005 10:11:21 GMT]]></title><description><![CDATA[<p>danke für den vorschlag habs jetzt mal geändert auf:</p>
<p>//Datei aufrufen<br />
ShellExecute(NULL,&quot;open&quot;,&quot;C:\\test.cmd&quot;,NULL,&quot;C:\&quot;,SW_HIDE);</p>
<p>//10sec Pause<br />
Sleep(10000);</p>
<p>//Neustarten<br />
DWORD res=0;<br />
ExitWindowsEx(EWX_FORCE|EWX_REBOOT,res);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/944094</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/944094</guid><dc:creator><![CDATA[weedhead87]]></dc:creator><pubDate>Sat, 17 Dec 2005 10:11:21 GMT</pubDate></item></channel></rss>