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.

[solved]creating folder

Help for those learning Tcl or writing their own scripts.
Post Reply
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

[solved]creating folder

Post by tueb »

Hi,

is there an command to create a new folder?

thx,

tueb
Last edited by tueb on Thu Feb 05, 2009 1:05 pm, edited 1 time in total.
#Quiz.de @ irc.GameSurge.net
JavaChat
D
DaRkOoO
Halfop
Posts: 67
Joined: Sat Sep 27, 2008 7:27 am

Post by DaRkOoO »

mkdir foldername
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

Post by arfer »

In Tcl the full command syntax is :-

file mkdir dir ?dir ...?

mkdir used alone is Eggdrop Tcl used for the bot's filesystem and, as far as I am aware, requires that the filesys module is loaded (it is not loaded by default).
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

Post by tueb »

thx, I will try that



PS: the one with "file" in fropnt worked:

Code: Select all

[file mkdir "newfolder"]
#Quiz.de @ irc.GameSurge.net
JavaChat
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

Post by tueb »

..and how do i check if a folder already exists? =)
#Quiz.de @ irc.GameSurge.net
JavaChat
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

Post by arfer »

file isdirectory name

returns 1 if it is a directory, 0 otherwise

read the core tcl file command and its various options

http://www.tcl.tk/man/tcl8.4/TclCmd/file.htm

also read Eggdrop Tcl commands associated with the filesys module which, as I said earlier, requires that the module is loaded

http://www.eggheads.org/support/egghtml ... ml#filesys
t
tueb
Halfop
Posts: 76
Joined: Thu Oct 04, 2007 6:09 am
Location: #quiz.de @ irc.gamesurge.net
Contact:

Post by tueb »

thx
#Quiz.de @ irc.GameSurge.net
JavaChat
Post Reply