Hot to access the text file and delete it

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

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”

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs