Posted 17 November 2013 - 07:54 AM
Hey.
I made a Program that remove all files on the Computer.
But there is one Problem….the ROM-Folder…
The Program works, it delete all files on the computer but it also try to delete the rom-folder.
…
Can i make a program that remove all files but that don't try to remove the rom-folder?
The Code…
(its not the whole script, only the function)
I made a Program that remove all files on the Computer.
But there is one Problem….the ROM-Folder…
The Program works, it delete all files on the computer but it also try to delete the rom-folder.
…
Can i make a program that remove all files but that don't try to remove the rom-folder?
The Code…
function rmall()
shell.run("clear")
list = fs.list("/")
anzahl = #list
zaehler = 0
print("Do you really want to remove all files?")
write("Y/N>")
eingabe = read()
if eingabe == "Y" then
while zaehler <= anzahl do
fs.delete(tostring(list[zaehler]))
zaehler = zaehler + 1
end
elseif eingabe == "N" then
print("canceled...")
sleep(2)
shell.run("disk/startup")
else
print("What?")
sleep(2)
rmall()
end
(its not the whole script, only the function)