This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
SilverRock75's profile picture

Formatting a turtle/computer

Started by SilverRock75, 14 December 2012 - 01:32 PM
SilverRock75 #1
Posted 14 December 2012 - 02:32 PM
I accidentally overrode the "programs" program with one of my own. I can no longer see all of my programs and everything important is backed up on drives. It would be really simple if I could just format it. Is there a way to entirely format it, even though it has a label already? Thank you.
Sammich Lord #2
Posted 14 December 2012 - 02:40 PM
Do you mean erase everything on the turtle?
SilverRock75 #3
Posted 14 December 2012 - 02:44 PM
Yes I do, and after a little playing around I was able to just clear the label then pick up the turtle.
For anyone who has a similar problem in the future I used "
label clear
" to get rid of the label. It was a simple fix that I wish I had just tried before making a post :P/>.
Sammich Lord #4
Posted 14 December 2012 - 02:53 PM
A easier way to do it is this:

for k,v in pairs(fs.list("/")) do
  if not fs.isReadOnly(v) then
    fs.delete(v)
  end
end
Lyqyd #5
Posted 14 December 2012 - 03:14 PM
For future reference, you didn't actually override it, since it's in ROM. You could just have done rm /programs and all would have been well again.