<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/2542" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2002-09-09T05:52:48-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/2542</id>

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-09-09T05:52:48-04:00</updated>

		<published>2002-09-09T05:52:48-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10681#p10681</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10681#p10681"/>
		<title type="html"><![CDATA[Backup of txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10681#p10681"><![CDATA[
You can simply use the "[file copy]" command provided with Tcl.<br><br>It's far quicker, and it doesn't given any of the hastle assosiated with {}'s in badly handled strings.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Sep 09, 2002 5:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-07T11:54:00-04:00</updated>

		<published>2002-09-07T11:54:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10616#p10616</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10616#p10616"/>
		<title type="html"><![CDATA[Backup of txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10616#p10616"><![CDATA[
DOH!!!<br><br>Works like a charm.... Thanks<p>Statistics: Posted by Guest — Sat Sep 07, 2002 11:54 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-09-07T11:50:49-04:00</updated>

		<published>2002-09-07T11:50:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10615#p10615</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10615#p10615"/>
		<title type="html"><![CDATA[Backup of txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10615#p10615"><![CDATA[
u tried this?<div class="codebox"><p>Code: </p><pre><code>while {![eof $file]} {   set f "[gets $file]"   puts $backupfile $f }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Sat Sep 07, 2002 11:50 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-07T11:43:27-04:00</updated>

		<published>2002-09-07T11:43:27-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10613#p10613</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10613#p10613"/>
		<title type="html"><![CDATA[Backup of txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10613#p10613"><![CDATA[
No, because then there would be lots of {}<br><br>But I tried putting all data into a string.... but that does not keep the newlines....<br><br>So maybe put it all into an array and load the lines into the new file?<br><br>so my question is... <br><br>array set x {}<br>how do I just add an element to x...?<p>Statistics: Posted by Guest — Sat Sep 07, 2002 11:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-09-07T11:40:47-04:00</updated>

		<published>2002-09-07T11:40:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10612#p10612</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10612#p10612"/>
		<title type="html"><![CDATA[Backup of txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10612#p10612"><![CDATA[
u could just put the whole list into the file as it is... if u want to apply each element to the list :<div class="codebox"><p>Code: </p><pre><code>foreach l $somelist {  puts $file $l}</code></pre></div>this should do the trick <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Sat Sep 07, 2002 11:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-07T11:27:36-04:00</updated>

		<published>2002-09-07T11:27:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10611#p10611</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10611#p10611"/>
		<title type="html"><![CDATA[Backup of txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10611#p10611"><![CDATA[
nice, thanks... how do I loop through the list? and put it in.. the read thing does not work<p>Statistics: Posted by Guest — Sat Sep 07, 2002 11:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-09-07T11:25:13-04:00</updated>

		<published>2002-09-07T11:25:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10609#p10609</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10609#p10609"/>
		<title type="html"><![CDATA[Backup of txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10609#p10609"><![CDATA[
I think this:<div class="codebox"><p>Code: </p><pre><code>set op [open $thefile r]set fs [read $op]</code></pre></div>should put everything in the file into the $fs var<br><br>if not...<div class="codebox"><p>Code: </p><pre><code>while {![eof $file]} {  set f "[gets $file]"  lappend somelist $f}</code></pre></div>then this should read every line of the file and put them into $somelist<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Sat Sep 07, 2002 11:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-07T11:13:35-04:00</updated>

		<published>2002-09-07T11:13:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10608#p10608</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10608#p10608"/>
		<title type="html"><![CDATA[Backup of txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10608#p10608"><![CDATA[
Thanks.. how do I read the whole file into a variable.. gets only gets one line<p>Statistics: Posted by Guest — Sat Sep 07, 2002 11:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2002-09-07T10:57:31-04:00</updated>

		<published>2002-09-07T10:57:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10607#p10607</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10607#p10607"/>
		<title type="html"><![CDATA[Backup of txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10607#p10607"><![CDATA[
open the txt file and read it into a variable/list, then open a new file (the bak file) and put the variable in there.... [open $somefile a+]  &lt;--- that should make a new file if it does not already exists.... u might wanna check if the file exists <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=852">Papillon</a> — Sat Sep 07, 2002 10:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-09-07T10:23:30-04:00</updated>

		<published>2002-09-07T10:23:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=10605#p10605</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=10605#p10605"/>
		<title type="html"><![CDATA[Backup of txt file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=10605#p10605"><![CDATA[
Hello, I want to make a backup of a file called words.txt to words.bak<br><br>So I was wondering how to do this... perhaps there is a copy function or something?<p>Statistics: Posted by Guest — Sat Sep 07, 2002 10:23 am</p><hr />
]]></content>
	</entry>
	</feed>
