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

access denied when deleteing my files

Started by tball146, 15 December 2016 - 04:53 PM
tball146 #1
Posted 15 December 2016 - 05:53 PM
hello today i was playing with computercraft an for some reason i cant delete my file called password.txt the version i was on at the time is 1.8.9 this bug is very irritating i have tried re entering my world an it hasnt fixed it
please help
here is a picture of the glitch
https://gyazo.com/6d...2e7f2471bc6abc4
for some reason the photo extension isnt allowed on this site so heres a link instead
TheRockettek #2
Posted 15 December 2016 - 07:23 PM
This is caused due to the fact you most probable opened a file handle but you never closed the file handle. You can:

Close the handle

Restarting the computer usually fixes everything.
tball146 #3
Posted 15 December 2016 - 09:59 PM
thank you i will try this
will re-reply if it didnt work
Edited on 15 December 2016 - 09:00 PM
Lyqyd #4
Posted 16 December 2016 - 01:10 AM
Moved to Ask a Pro.
houseofkraft #5
Posted 16 December 2016 - 01:47 AM
If it says Access Denied when you do rd * it is because it tries to delete everything on the HDD including the rom directory. So it will say Access Denied. If you try to delete a specific file ex. rm test then you will probably have to either close the file handle or restart the computer. But, When you restart the computer beware that files may not be saved if they have not been flushed!
Edited on 16 December 2016 - 12:47 AM
Cross_Sans #6
Posted 07 January 2017 - 12:38 PM
I tried:

local file = fs.open("/password.txt");
file.close();

and worked.