Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- local protocol = ""
- while true do
- id, message = rednet.receive(protocol)
- if message == "RECEIVE" then
- print("Received a file.")
- sleep(0.1)
- id2, message2 = rednet.receive(protocol)
- sleep(0.1)
- local file = fs.open(message2,"w")
- id3, message3 = rednet.receive(protocol)
- print("File name is "..message2)
- sleep(0.1)
- file.write(message3)
- file.close()
- print("Saved File")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement