Marlingaming

CC Tweaked CCSPS Iron - Os Manager

Jan 24th, 2022 (edited)
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. local tArg = {...}
  2.  
  3.  
  4.  
  5. local Action = tArg[1]
  6. if Action == "Update" then
  7.  
  8. elseif Action == "CleanFolder" then
  9. local Cleans = fs.list(tArg[2])
  10. for i = 1, #Cleans do
  11. fs.delete(Cleans[i])
  12. end
  13. elseif Action == "RunFolder" then
  14. local Runs = fs.list(tArg[2])
  15. for i = 1, #Runs do
  16. shell.run(fs.combine(tArg[2],Runs[i]))
  17. end
  18. elseif Action == "DownloadExternal" then
  19. local Drive = peripherals.find(tArg[2])
  20. local Path = Drive.getMountPath()
  21. local ExItems = fs.list(Path)
  22. for i = 1, #ExItems do
  23. fs.copy(fs.combine(Path,ExItems[i]),fs.combine(tArg[3],ExItems[i]))
  24. end
  25. end
Add Comment
Please, Sign In to add comment