Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if not turtle then
- return
- end
- term.clear()
- term.setCursorPos(1, 1)
- if not fs.exists("disk/copy") then
- printError("No copy directory.")
- return
- end
- print("copying files...")
- local files = fs.list("disk/copy")
- for _, file in ipairs(files) do
- print("copying", file)
- local path = "disk/copy/" .. file
- local dest = "/" .. file
- if fs.exists(dest) then
- fs.delete(dest)
- end
- fs.copy(path, dest)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement