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.
Old posts that have not been replied to for several years.
T
TeDDyBeeR
Post
by TeDDyBeeR » Sun Dec 22, 2002 5:25 am
Hello can someone help me with this, i can;t figger out how exec works, or can someone give me an other option to remove files in a directory, thats not listed in a file or string:
i use now:
Code: Select all
set filenames "${nspuplinkdir}/*.uplink"
exec rm -r ${filenames}
Where nspuplinkdir is a directory in the bots dir "nspuplink"
whithout the bots path !
I will remove all files with *.uplink as extentie
Already thnx
TeDDyBeeR
The Netherlands.
tainted
Master
Posts: 239 Joined: Sun May 12, 2002 8:00 pm
Location: chicago
Contact:
Post
by tainted » Sun Dec 22, 2002 5:35 am
why not rm -rf directory/*.uplink? I believe eggdrop's working directory for exec commands is the eggdrop directory..
T
TeDDyBeeR
Post
by TeDDyBeeR » Sun Dec 22, 2002 5:43 am
if have try'd that also : ps $nspuplinkdir is a "setting" nog a name
and as variable ppl can set in the bot whatever that directory is
If i put -rf behind the rm command it will not give any errors
if i do :
Code: Select all
exec rm -r ${nspuplinkdir}/*.uplink
he will give this error in the eggdrop :
Code: Select all
Tcl error [douplinktime]: rm: cannot remove `nspuplink/*.uplink': No such file or directory
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Mon Dec 23, 2002 12:19 pm
See the file command provided by Tcl.
T
TeDDyBeeR
Post
by TeDDyBeeR » Sun Dec 29, 2002 7:35 am
ppslim : if i knew there is a TCL command for, then i had use it
but i don't know that command i think
can you help me out on this?
regards,
TeDDyBeeR
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Sun Dec 29, 2002 10:39 pm
Do as all greate minds do, and get off your backside.
I have allready given the command name that you should be looking at, and with a quick browse over at google, we can get a link to the TCL/TK man pages, to have a look at the command ourselves.