egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[solved]creating folder

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Thu Feb 05, 2009 8:48 am    Post subject: [solved]creating folder Reply with quote

Hi,

is there an command to create a new folder?

thx,

tueb
_________________
#Quiz.de @ irc.GameSurge.net
JavaChat


Last edited by tueb on Thu Feb 05, 2009 1:05 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
DaRkOoO
Halfop


Joined: 27 Sep 2008
Posts: 67

PostPosted: Thu Feb 05, 2009 9:42 am    Post subject: Reply with quote

mkdir foldername
Back to top
View user's profile Send private message
arfer
Master


Joined: 26 Nov 2004
Posts: 436
Location: Manchester, UK

PostPosted: Thu Feb 05, 2009 11:10 am    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Thu Feb 05, 2009 12:47 pm    Post subject: Reply with quote

thx, I will try that



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

Code:

[file mkdir "newfolder"]

_________________
#Quiz.de @ irc.GameSurge.net
JavaChat
Back to top
View user's profile Send private message Visit poster's website
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Thu Feb 05, 2009 2:35 pm    Post subject: Reply with quote

..and how do i check if a folder already exists? =)
_________________
#Quiz.de @ irc.GameSurge.net
JavaChat
Back to top
View user's profile Send private message Visit poster's website
arfer
Master


Joined: 26 Nov 2004
Posts: 436
Location: Manchester, UK

PostPosted: Thu Feb 05, 2009 2:46 pm    Post subject: Reply with quote

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/1.6.19/tcl-commands.html#filesys
Back to top
View user's profile Send private message
tueb
Halfop


Joined: 04 Oct 2007
Posts: 76
Location: #quiz.de @ irc.gamesurge.net

PostPosted: Fri Feb 06, 2009 12:36 pm    Post subject: Reply with quote

thx
_________________
#Quiz.de @ irc.GameSurge.net
JavaChat
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber