22 posts
Location
java.exception:3753:location not found
Posted 25 November 2016 - 06:57 AM
Okay I'll keep this short. Let's say you have to many programs, or you want to troll your friend (Not responsible) but you can't be stuffed deleting them one by one well.. I have a program for that. It is called…
Wolf-Cleanup It is a cleanup program that will get rid of all user-made programs.
Here is the pastebin link:
http://pastebin.com/s41wJP5iAnd here is to do it in-game: pastebin get s41wJP5i cleanup
Hopefully you will enjoy this :)/>
Spoiler
Screenshots:[attachment=2696:Capture1.PNG][attachment=2697:Capture3.PNG][attachment=2698:Capture4.PNG]
726 posts
Location
Rem is best girl
Posted 25 November 2016 - 07:11 AM
you could just do "rm *" …
749 posts
Location
BOO!!
Posted 25 November 2016 - 07:40 PM
Hey, I noticed it deletes ALL files.
What if you added the ability to run it in multiple ways:
#cleanup
Cleaning ALL files
[is this not what you want? cleanup -h]
Are you sure?
[y/n]—
Deleting all files
#cleanup folder1 folder2 file1 file2
Cleaning...
rm'ing folder folder2 file1 file2
--...
#cleanup -ex folder 2
Removing all but folder 2
#cleanup -v
Removed file1, a file
Unable to remove rom
Unable to remove disk
removed folder1, a folder
#cleanup -h
Cleanups files for yoi
Usage:
Cleanup -- Remove all files
Cleanup -h --This screen
Optional args
choose files to delete
[-ex] Switch files params with all other files
[-v] Print whats happening
61 posts
Location
Somewhere, deep down under a rainbow.
Posted 26 November 2016 - 03:11 PM
I improved your program. Dunno why, I just did.
code
term.setBackgroundColor(colors.blue)
term.clear()
term.setCursorPos(1, 1)
print("Wolf-Cleanup by WolfDood")
print("Are you sure you want to delete all files (Including this one)? y/n")
write(">> ")
yorn = read()
if yorn:lower() == "y" then
for _, f in ipairs(fs.list("")) do
if not fs.isReadOnly(f) then
fs.delete(f)
end
end
print("All done! Goodbye!")
os.sleep(2)
os.reboot()
elseif not yorn:lower() == "y" then
print("Clean up cancelled")
term.setBackgroundColor(colors.black)
term.clear()
term.setCursorPos(1, 1)
end