Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Waiting for mainframe to confirm transfer...")
- while true do
- sleep(1)
- if fs.exists("disk/temp") == true then
- local h = fs.open("disk/temp","r")
- local j = h.readLine(1)
- if j == "1" then
- print("Copying files to mainframe...")
- sleep(0.20)
- fs.delete("temp")
- fs.copy("disk/temp","temp")
- local f = fs.list("drive")
- for _, file in ipairs(f) do
- if file ~= "startup" and file ~= "disk" and file ~= "rom" and file ~= "temp" then
- fs.move("drive/"..file,"disk/"..file)
- end
- end
- h.close()
- print("Files copied.")
- end
- elseif fs.exists("disk/temp1") == true then
- local h = fs.open("disk/temp1","r")
- local j = h.readLine(1)
- if j == "1" then
- h.close()
- print("Copying files from mainframe...")
- sleep(0.20)
- fs.delete("temp1")
- fs.move("disk/temp1","temp1")
- local f = fs.list("disk")
- for _, file in ipairs(f) do
- if file == "startup" then
- fs.move("disk/startup","drive/startup1")
- elseif file == "temp" then
- fs.move("disk/temp","drive/temp10")
- else
- fs.move("disk/"..file,"drive/"..file)
- end
- end
- print("Files copied.")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement