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

delete all files

Started by SpencerBeige, 25 February 2015 - 09:31 PM
SpencerBeige #1
Posted 25 February 2015 - 10:31 PM

files = fs.list("disk")
for i = 1, #files do
  fs.delete(files[i])
end

doesn't work
GopherAtl #2
Posted 25 February 2015 - 10:35 PM

files = fs.list("disk")
for i = 1, #files do
  fs.delete("disk/"..files[i])
end
SpencerBeige #3
Posted 25 February 2015 - 10:37 PM

files = fs.list("disk")
for i = 1, #files do
  fs.delete("disk/"..files[i])
end

ooooooooooooooooo. idk why, i always forget im using a dir ;p