Advertisement
Savage_Me55iah

backup

Oct 31st, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.26 KB | None | 0 0
  1. local tArgs = { ... }
  2. local file = tostring(tArgs[1])
  3. local command = tostring(tArgs[2])
  4.  
  5. if command == "backup" then
  6. fs.delete("disk/" .. file)
  7. fs.copy(file, "disk/" .. file)
  8. elseif command == "restore" then
  9. fs.delete(file)
  10. fs.copy("disk/" .. file, file)
  11. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement