CobraOs

Untitled

Oct 24th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. local FileList = fs.list("disk/") --Table with all the files and directories available
  2.  
  3. for _, file in ipairs(FileList) do --Loop. Underscore because we don't use the key, ipairs so it's in order
  4. if not fs.isDir(file) then
  5. shell.run("cp", "disk/"..file, file)
  6. print(file) --Print the file name
  7. end
  8. end --End the loop
  9.  
  10. shell.run("delete", "startup")
  11. shell.run("copy", "setup", "startup")
  12. shell.run("textedit", "settings")
  13. shell.run("textedit", "items")
  14.  
  15. term.setTextColor(colors.black)
  16. term.setBackgroundColor(colors.white)
  17. term.clear()
  18. local image = paintutils.loadImage("bank")
  19. paintutils.drawImage(image, 1, 1)
  20. term.setCursorPos(16, 8)
  21. term.write("Please remove card")
  22. while disk.hasData("top") do
  23. os.queueEvent("randomEvent")
  24. os.pullEvent()
  25. end
  26.  
  27. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment