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

How to clear floppy

Started by matejdro, 29 August 2012 - 08:57 PM
matejdro #1
Posted 29 August 2012 - 10:57 PM
Is there a way to somehow completely clear floppy like formatting?

I'm having locked folder on my floppy that I cannot delete for some reason (I keep getting access denied).
Kingdaro #2
Posted 29 August 2012 - 11:01 PM
Try this:


local filepath = 'disk/' -- change this to the path of your folder, or just leave it to clear the whole drive.
for i,v in pairs(fs.list(filepath)) do
  fs.delete(filepath .. v)
end
matejdro #3
Posted 29 August 2012 - 11:02 PM
I have already said that I cannot delete files one by one, because I get access denied error.

Those files were written using io api.
Kingdaro #4
Posted 29 August 2012 - 11:06 PM
Are the files open in another program? Or just open in general?
matejdro #5
Posted 29 August 2012 - 11:11 PM
They are not open anymore. I have rebooted and even broken/replaced turtle next to disk drive multiple times but files still persist.
matejdro #6
Posted 29 August 2012 - 11:46 PM
Apparently I forgot to close file in the program. But that was many reboots ago. How is file still locked?
Andybish #7
Posted 30 August 2012 - 12:41 AM
go into .minecraft/saves/[yourworld]/computer/disk/[disknumber] (if you don't know which it is, search them all) and delete the file there.
Close minecraft first though.
matejdro #8
Posted 30 August 2012 - 12:42 AM
This is on SMP server. Let's assume that I don't have access to any files. How would I do it apart from creating new disk and trash current one?