Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- local sides = {"back"}
- for i=1,#sides do
- if not rednet.isOpen(sides[i]) then
- rednet.open(sides[i])
- end
- end
- while true do
- id,msg = rednet.receive("ftp")
- if msg == "RECEIVE" then
- id2,msg2 = rednet.receive("ftp")
- f = fs.open(msg2, "w")
- id3,msg3 = rednet.receive("ftp")
- f.write(msg3)
- f.close()
- print("File "..msg2.." received!")
- elseif msg == "SC" then
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement