Nuclear_Man_D icon

Backup-Files

Nuclear_Man_D | PRO | 01/06/17 12:04:25 AM UTC | 0 ⭐ | 332 👁️ | Never ⏰ | []
Lua |

550 B

|

None

|

0 👍

/

0 👎

--ignore list - keys in this table cover what won't be copied
--the "true" is meaningless, this is just a handy way to lookup keys quickly
local ignore={
  disk=true,
  rom=true,
  --anything else you don't want copied add here.
}
local fn="disk/"..tostring(os.getComputerID())..'/'
fs.makeDir(fn)
--list everything in root folder...
for _,filename in fs.list("")
  --only stuff not in ignore list
  if not ignore[filename] then
        --copy
        fs.copy(filename,fn..filename)
  end
end
if fs.exists("/startup") then
    shell.run("/startup")
end

Comments