Advertisement
SansIsLazy

HDD Formattor

Dec 5th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.31 KB | None | 0 0
  1. print"Witch drive would you like to format?"
  2. local installdir = read()
  3.  
  4. if fs.exists(installdir) then
  5. local files = fs.list(installdir)
  6.  
  7. for i=1, #files, 1 do
  8.    if files[i] ~= "rom" then
  9.       fs.delete(installdir .. files[i])
  10.    end
  11. end
  12. print"Complete!"
  13. else
  14.     print(installdir.." is not a directory!")
  15.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement