This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

getfiles

Old posts that have not been replied to for several years.
Locked
P
Progeny

Post by Progeny »

Hi,
I've a problem about the function getfiles.
I set in a variable the return value of getfiles (it return the files of a dir).
I use:
set files [{getfiles $homedir}]
putserv "PRIVMSG $chan :$files"
[12:30] Tcl error [flist]: invalid command name "getfiles $fhome"
I've been loaded the transfer and filesys module, how I can do?

<font size=-1>[ This Message was edited by: Progeny on 2002-04-08 08:37 ]</font>
M
Mordred

Post by Mordred »

as far as I know, "getfiles" is not an included command. From what you want to do, I suggest "glob".

glob -directory $dirname *

http://tmml.sourceforge.net/doc/tcl/glob.html
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

The problem is you have an extra set of curly braces.

set files [{getfiles $homedir}]

It's trying to execute the command {getfile $homedir}. What you want is to execute getfile, with $homedir as an argument.

set files [getfiles $homedir]
Locked