TmsKerail

DiskStartup.lua

Jul 19th, 2021 (edited)
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. for _, file in pairs(fs.list("")) do
  2.     if not fs.isDir(file) then
  3.         print("Deleting: " .. file)
  4.         fs.delete(file)
  5.     end
  6. end
  7.  
  8. for _, match in pairs(fs.complete("", "disk")) do
  9.     if not fs.isDir("disk/" .. match) and not fs.exists(match) then
  10.         if match ~= "startup.lua" then
  11.             print("Copying: " .. match)
  12.             fs.copy("disk/" .. match, match)
  13.         end
  14.     end
  15. end
  16.  
Add Comment
Please, Sign In to add comment