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 

Delete all the lines in a .txt file

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
HÒóme
Voice


Joined: 11 Sep 2009
Posts: 5

PostPosted: Fri Sep 11, 2009 1:35 pm    Post subject: Delete all the lines in a .txt file Reply with quote

Hi There.

How can i delete all the lines in a .txt file? I dont want to delete the file, just the lines. (or delete the file and create it again, but empty)

Thanks.[/list]
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Fri Sep 11, 2009 1:41 pm    Post subject: Reply with quote

Code:
set my_file [open "some_txt_file.txt" w]
close $my_file
Back to top
View user's profile Send private message Visit poster's website
HÒóme
Voice


Joined: 11 Sep 2009
Posts: 5

PostPosted: Fri Sep 11, 2009 2:32 pm    Post subject: Reply with quote

Thank you very much Smile
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