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 

Write to temp file

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


Joined: 15 Dec 2003
Posts: 46

PostPosted: Sun Oct 18, 2009 9:17 am    Post subject: Write to temp file Reply with quote

I need a bot to write to a temp file send that fiel via dcc then delete it is it even possible?

I understand how to write to a file and I also know how to dcc that file but what about delete the file is it possible?
Would I need to set a time to delete the file or could I do it after use?

Im sorry if this has been posted before but its hard to know how best to find an answer to this one. The word delete has been used many times as has the word temp or temporary.
_________________
Driving lessons bolton
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sun Oct 18, 2009 12:56 pm    Post subject: Re: Write to temp file Reply with quote

ShavdApe wrote:
I need a bot to write to a temp file send that fiel via dcc then delete it is it even possible?

I understand how to write to a file and I also know how to dcc that file but what about delete the file is it possible?
Would I need to set a time to delete the file or could I do it after use?

Im sorry if this has been posted before but its hard to know how best to find an answer to this one. The word delete has been used many times as has the word temp or temporary.


I have one script that I wrote for my own use, that can delete a file.
The line is similar to this:
if [ file exists $_filename ] {file delete $filename }

Since you said you can write to a file, that means you KNOW where the file is, and how to find it. .... you won't have any problems with deleting something you don't want to delete. Smile


http://www.tcl.tk/man/tcl8.5/
and specifically:
http://www.tcl.tk/man/tcl8.5/TclCmd/file.htm#M12

were helpful to me. Maybe they will help you too.
Back to top
View user's profile Send private message
ShavdApe
Halfop


Joined: 15 Dec 2003
Posts: 46

PostPosted: Sun Oct 18, 2009 1:09 pm    Post subject: Reply with quote

lol typical that it would be that easy I expected the solution to be a little more difficult than that thanks for the reply appreciated. Havent tested it but if its that easy to delete then Im sure it will be fine.
_________________
Driving lessons bolton
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Tue Oct 20, 2009 11:38 am    Post subject: Reply with quote

ShavdApe wrote:
lol typical that it would be that easy I expected the solution to be a little more difficult than that thanks for the reply appreciated. Havent tested it but if its that easy to delete then Im sure it will be fine.


You're welcome. Smile
I hope it helped.
Back to top
View user's profile Send private message
raider2k
Op


Joined: 01 Jan 2008
Posts: 140

PostPosted: Wed Oct 21, 2009 2:52 am    Post subject: Reply with quote

exec rm -f $filename

would be a different way to do it
Back to top
View user's profile Send private message
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