[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Hot to access the text file and delete it.

Ankush Regundwar

12/14/2007 10:19:00 AM

How do i access the text file and delete the file. This file gets
generated periodically. So i need to make a script for d same so that i
can delete it just by running the ruby script
--
Posted via http://www.ruby-....

2 Answers

Ankush Regundwar

12/14/2007 10:19:00 AM

0

Ankush Regundwar wrote:
> How do i access the text file and delete the file. This file gets
> generated periodically. So i need to make a script for d same so that i
> can delete it just by running the ruby script

"I was able to access the file but not able to delet it"
--
Posted via http://www.ruby-....

Lloyd Linklater

12/14/2007 12:03:00 PM

0

Ankush Regundwar wrote:
> How do i access the text file and delete the file. This file gets
> generated periodically. So i need to make a script for d same so that i
> can delete it just by running the ruby script

Are you looking for something like

File.open("testrm", "w+") { do_stuff }
File.delete("testrm") ! 1
--
Posted via http://www.ruby-....