<?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/3465" />

	<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>2003-01-18T07:57:34-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-01-18T07:57:34-04:00</updated>

		<published>2003-01-18T07:57:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15489#p15489</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15489#p15489"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15489#p15489"><![CDATA[
ppslim: I'm sorry If I have let you under the wrong impresion that I'm plain laziness.<br><br>I have come to the correct command eventualy, after reading your advice.<br>[expr 4/2] makes the calc thing. Seesh..<br><br>Thank you for your time, support and mostly for your kindly cooperation and sorry again..<br><br>spock: there is no need to be rude or something.. I haven't done you anything, or have I done?<br><br>Make your own mistakes, not somebody else's..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sat Jan 18, 2003 7:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spock]]></name></author>
		<updated>2003-01-17T18:02:34-04:00</updated>

		<published>2003-01-17T18:02:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15474#p15474</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15474#p15474"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15474#p15474"><![CDATA[
/me gets his flamethrower<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2369">spock</a> — Fri Jan 17, 2003 6:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-17T15:06:55-04:00</updated>

		<published>2003-01-17T15:06:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15471#p15471</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15471#p15471"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15471#p15471"><![CDATA[
<strong class="text-strong"><a href="http://www.tcl.tk/man/tcl8.3/TclCmd/contents.htm" class="postlink">PLEASE VISIT THIS PAGE</a></strong><br><br>Try readin up about each command in the manual. I'm sure you will come to the correct command eventualy.<br><br>It's plain laziness, to know where the manual is, yet fail to try looking yourself, and wait for us to point it out.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri Jan 17, 2003 3:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-01-17T14:36:58-04:00</updated>

		<published>2003-01-17T14:36:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15470#p15470</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15470#p15470"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15470#p15470"><![CDATA[
Figured out myself how to get the time: [clock format [file atime "${dir}"] -format {%A, %d %B %Y @ %H %M %S}]<br><br>but how to make the KB and MB calc?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Jan 17, 2003 2:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-17T11:43:21-04:00</updated>

		<published>2003-01-17T11:43:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15467#p15467</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15467#p15467"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15467#p15467"><![CDATA[
Do I have to keep quoting the Tcl manual.<br><br>See the "clock format" command for time conversion.<br><br>As for working out MB and so on, it's a case of simple math.<br><br>Bytes / 1024 = Kbytes<br>Kbytes / 1024 = Mbytes<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri Jan 17, 2003 11:43 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-01-17T10:32:37-04:00</updated>

		<published>2003-01-17T10:32:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15466#p15466</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15466#p15466"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15466#p15466"><![CDATA[
Now works. As as sow, the result is in bytes, how to transfor it in KB and/or MB?<br><br>Oh, and also how to transform the result of the [file atime "${dir}"] in something more comestible like 17 Jan. 2003 @ 12:45 or something like this. I'm getting an result in seconds or something like this as far as I can see..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Jan 17, 2003 10:32 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-17T09:49:05-04:00</updated>

		<published>2003-01-17T09:49:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15465#p15465</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15465#p15465"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15465#p15465"><![CDATA[
make it<br><div class="codebox"><p>Code: </p><pre><code>foreach a [glob -type f "${dir}*"] {</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri Jan 17, 2003 9:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-01-17T09:14:36-04:00</updated>

		<published>2003-01-17T09:14:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15464#p15464</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15464#p15464"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15464#p15464"><![CDATA[
"files/" dir exists.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Jan 17, 2003 9:14 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-17T06:52:20-04:00</updated>

		<published>2003-01-17T06:52:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15461#p15461</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15461#p15461"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15461#p15461"><![CDATA[
Do those directories exist?<br><br>"/files/" is a obsolute directory.<br>"files/" is relative to the current directory<br>"files" is also relative to the currect die. It simply doesn't have the trailing slash.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri Jan 17, 2003 6:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-01-17T06:27:34-04:00</updated>

		<published>2003-01-17T06:27:34-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15460#p15460</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15460#p15460"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15460#p15460"><![CDATA[
bind dcc n tmp task:tmp<br><br>proc task:tmp { hand idx arg } {<br>global db<br>set dir "files"<br>set c 0<br>foreach a [glob -type f $dir] { <br>incr c [file size $a] <br>} <br>putlog "Dir size: $c"<br>}<br><br>And I'm getting an error: Tcl error [task:tmp]: no files matched glob pattern "files". Also tryed with "/files/" and "files/" and the same result.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Jan 17, 2003 6:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-17T06:09:30-04:00</updated>

		<published>2003-01-17T06:09:30-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15456#p15456</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15456#p15456"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15456#p15456"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc filefullsize {dir} {  if {![file exists $dir]} { error "No such directory exists" }  set c 0  foreach a [glob -type f $dir] {    incr c [file size $a]  }  return $c}</code></pre></div><br>Use the abov function like so.<br><div class="codebox"><p>Code: </p><pre><code>set directory "/file/audio/"set filesizes [filefullsize $directory]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri Jan 17, 2003 6:09 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-01-17T04:21:55-04:00</updated>

		<published>2003-01-17T04:21:55-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15450#p15450</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15450#p15450"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15450#p15450"><![CDATA[
As I have tested and seen with:<br><br>bind dcc n tmp task:tmp<br><br>proc task:tmp { hand idx arg } {<br>global db<br>set file "pub/"<br>putlog "Size: [file size $file]"<br>}<br><br>the size works only for files. Seems that I have to get the size of all the files and then to add them to a variable and finaly that variable represends the size of the dir. Is there any other way to seee the dir's size? My alternative is bit messy but what a hell.. If there is no other I must do so.. Ce la vie.. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>As for the "file mtime name" I have noticed that works for a dir. The only thing that I'm confused with is that I'm getting a result like this: 1042649520. How to make it look like eg. January 17, 2003?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Jan 17, 2003 4:21 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-01-17T03:19:23-04:00</updated>

		<published>2003-01-17T03:19:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15449#p15449</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15449#p15449"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15449#p15449"><![CDATA[
As I have seen on the TCL manual (<a href="http://tcl.activestate.com/man/tcl8.2.3/TclCmd/file.htm" class="postlink">http://tcl.activestate.com/man/tcl8.2.3/TclCmd/file.htm</a>) I have found the "file size name" to get the size of a file and "file mtime name" for the last modified thing. Will this two work also for the dirs or only for files?<br><br>Also I have found some other nice things I can do with the file thing and I haven't thinked about using them on the web page generation. Neat.. <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=187">caesar</a> — Fri Jan 17, 2003 3:19 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-01-17T02:15:40-04:00</updated>

		<published>2003-01-17T02:15:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15445#p15445</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15445#p15445"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15445#p15445"><![CDATA[
The "/mnt/multimedia/hollywood" is the dir where it searches for the other dirs in the proc. I need a count of "/multimedia/hollywood" to use it here: set dir [string range $dr [expr [string length files]+$db(no)] end] and the $db(no) is the result of that counting thing.<br><br>As for the second answer I'll have a look on the TCL manual for the file command.<br><br>Thanks again.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Fri Jan 17, 2003 2:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-16T17:25:38-04:00</updated>

		<published>2003-01-16T17:25:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15430#p15430</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15430#p15430"/>
		<title type="html"><![CDATA[alfabet]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15430#p15430"><![CDATA[
For number 1, I don't realy understand what you are asking for, hwoever, I will have a go.<br><br>Use somthing liek this<div class="codebox"><p>Code: </p><pre><code>set length [string length [lindex [split $item "/"] [expr [llength [split $item "/"]] - 1]]]</code></pre></div>As for the second. Read the Tcl manual. The file command will reveale all for filesize, dates, permissions, filetypes. It also provide move, copy and delete functions.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Jan 16, 2003 5:25 pm</p><hr />
]]></content>
	</entry>
	</feed>
