This is a program I made for sweeping and possibly cleaning out any hidden files.
My code may look like a jumbled mess because I don't tab spaces, but if you are feeling lucky, take a shot YEjQh2sc

How to Install :
1. Type "pastebin get YEjQh2sc sweeper"
2. Congratulations!

If you don't feel like clicking another link, and you are simply lazy, here is the source


files = { }
directory = { }
Vfiles = { }
Vdirectory = { }
print("Do you wish to remove hidden files?")
print("Y/N")
input = read()
if input == "y" or input == "Y" then
for i,v in pairs(fs.list("/")) do
if string.sub(v,0,1) == "." then
if fs.isDir(v) then
table.insert(directory, v)
else
table.insert(files, v)
end
fs.delete(v)
elseif fs.isDir(v) then
print("Found : "..v.."(DIR)")
else
print("Found : "..v)
end
end
for i,v in pairs(files) do
term.setTextColor(colors.red)
print("Deleted : "..v)
end
for i,v in pairs(directory) do
term.setTextColor(colors.red)
print("Deleted : "..v.."(DIR)")
end
term.setTextColor(colors.white)
print("Removed "..#files.." hidden files")
print("Removed "..#directory.." hidden directories")
elseif input == "n" or input == "N" then
for i,v in pairs(fs.list("/")) do
if string.sub(v,0,1) == "." then
if fs.isDir(v) then
print("Found : "..v.."(DIR)(HIDDEN)")
table.insert(Vdirectory, v)
else
table.insert(Vfiles, v)
print("Found : "..v.."(HIDDEN)")
end
elseif fs.isDir(v) then
print("Found : "..v.."(DIR)")
else
print("Found : "..v)
end
end
print("Found "..#Vfiles.." hidden files")
print("Found "..#Vdirectory.." hidden directories")
else
error("Could not parse "..input)
end
Have fun and don't be malicious.