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.

Deleting *.extentie with an Eggdrop Bot

Old posts that have not been replied to for several years.
Locked
T
TeDDyBeeR

Deleting *.extentie with an Eggdrop Bot

Post by TeDDyBeeR »

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.
t
tainted
Master
Posts: 239
Joined: Sun May 12, 2002 8:00 pm
Location: chicago
Contact:

Post by tainted »

why not rm -rf directory/*.uplink? I believe eggdrop's working directory for exec commands is the eggdrop directory..

Code: Select all

exec rm -rf uplinkdir/*.uplink
T
TeDDyBeeR

Post by TeDDyBeeR »

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
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

See the file command provided by Tcl.
T
TeDDyBeeR

Post by TeDDyBeeR »

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
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

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.
Locked